Hello, In first place I'm not going to do an algorithmic benchmark, just a simple loop + print test and some checks on the generated binaries.
The system is a Debian12 Linux and the architecture is: x86 64bits.
Mojo don't allow .py extension it has to be .mojo so no default nvim highlighting ...
$ mojo build mojo_benchmark.mojo
$ time ./mojo_benchmark
...
real 0m0.342s
user 0m0.080s
sys 0m0.252s
$ rustc rust_benchmark.rs
$ time ./rust_benchmark
...
real 0m0.107s
user 0m0.012s
sys 0m0.049s
I noticed a speed increase using fish shell instead of bash but could be the environment variable stack overload.
So in this specific test rust is much faster. And also the compiler suggests using _ instead i, that mojo compiler doesn't.
The rust binary is bigger, but is because the allocator is embedded:
-rwxr-xr-x 1 sha0 sha0 1063352 Jan 10 08:55 mojo_benchmark
-rwxr-xr-x 1 sha0 sha0 4632872 Jan 10 08:57 rust_benchmark
But Look this, mojo uses libstdc++ and libc and rust only uses libc.
$ ldd -d mojo_benchmark
linux-vdso.so.1 (0x00007ffd94917000)
libtinfo.so.6 => /lib/x86_64-linux-gnu/libtinfo.so.6 (0x00007fe899cb1000)
libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fe899a00000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fe899921000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fe899c91000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fe899740000)
/lib64/ld-linux-x86-64.so.2 (0x00007fe899d2c000)
$ ldd -d rust_benchmark
linux-vdso.so.1 (0x00007ffde67b7000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f8b3881b000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f8b3863a000)
/lib64/ld-linux-x86-64.so.2 (0x00007f8b388ae000)
Continue reading
- Best Hacking Tools 2020
- New Hacker Tools
- Beginner Hacker Tools
- Hack Apps
- Nsa Hack Tools
- Hacking Tools Windows
- Free Pentest Tools For Windows
- Hacking Tools Kit
- Hacks And Tools
- Pentest Tools Url Fuzzer
- Tools 4 Hack
- Hack Tools Download
- Hacker Tools Windows
- Hacking Tools For Kali Linux
- Hack Tool Apk No Root
- Hack Tools Mac
- Hacking Tools For Mac
- Computer Hacker
- Github Hacking Tools
- Pentest Automation Tools
- Hacking Tools Kit
- Underground Hacker Sites
- Hackrf Tools
- Hack Tool Apk No Root
- How To Hack
- Hacking Tools Download
- Hacking Apps
- Pentest Tools Open Source
- Hack Tools Mac
- Hacker Tools For Ios
- What Is Hacking Tools
- Hack Rom Tools
- Hacker Tools 2019
- Hacker
- Hacker Tools For Pc
- What Are Hacking Tools
- Hacker Tool Kit
- Hacker Tools Software
- New Hack Tools
- Hacker Tools Online
- Hack Tools Mac
- What Are Hacking Tools
- Hack Apps
- Hacker Hardware Tools
- Pentest Box Tools Download
- Blackhat Hacker Tools
- Hacking Tools Online
- Pentest Tools Apk
- Hacking Tools For Beginners
- Best Pentesting Tools 2018
- Hacking Tools 2020
- New Hacker Tools
- Bluetooth Hacking Tools Kali
- Pentest Tools For Android
- Hack Tools Download
- Hacking Tools Usb
- Pentest Tools Website Vulnerability
- Hak5 Tools
- Best Hacking Tools 2019
- Hacking Tools Online
- What Is Hacking Tools
- Hack Tools Download
- Pentest Tools Website
- Pentest Tools For Windows
- Pentest Tools Bluekeep
- Pentest Tools For Windows
- Pentest Tools Find Subdomains
- Pentest Tools Online
- Pentest Tools Find Subdomains
- Pentest Tools For Android
- Hacking Tools For Windows
- How To Make Hacking Tools
- Hacking Tools Hardware
- Black Hat Hacker Tools
- Hacking Tools 2020
- How To Hack
- Hack Tools 2019
- Hacking App
- Pentest Tools Android
- Hack Tools 2019
- Hacker Security Tools
- Pentest Tools For Windows
- Hacker Tools Windows
- Hacker Tools Free
- Pentest Tools Port Scanner
- Wifi Hacker Tools For Windows
- Hack Tools For Games
- Hacking Tools Windows 10
- Hacking Tools For Windows Free Download
- Hacker Tools Hardware
- Pentest Automation Tools
- Pentest Tools Website Vulnerability
- Hacking Tools Hardware
- Hacker Tools Linux
- Pentest Tools Url Fuzzer
- Hacker Tools Mac
- Hacking Tools 2020
- Hacking Tools For Windows 7
- Hacker Tools Free Download
- Hack Tools 2019
- Pentest Tools Download
- Hacking Tools Kit
- Hacker Tools Online
- Hack Rom Tools
- Hack Tools 2019
- Hacker Tools Windows
- Hacking Tools 2019
- Hacker Tools Windows
- Best Hacking Tools 2019
- Pentest Tools Free
- Hacking Tools Online
- Hak5 Tools
- Pentest Tools For Mac
- Hacker Tools 2019
- Hacker Tools Github
- Android Hack Tools Github
- Hacker Tools
- Hacker Tools 2019
- Hacker Tools 2020
- How To Install Pentest Tools In Ubuntu
- Hacker Hardware Tools
- Hack Apps
- Hacking Tools Github
- Pentest Tools Github
- Pentest Tools
- Best Hacking Tools 2020
- Hacker Tools
- Hacker Tools Online
- Hacking Tools 2019
- Hack Tools Github
- Hacking Tools For Windows 7
- New Hack Tools
- Underground Hacker Sites
- Growth Hacker Tools
- Hack Tool Apk No Root
- Hacking Tools Github
- Pentest Automation Tools
- Hacking Tools For Windows Free Download
- Pentest Reporting Tools
- Hacker Tools For Windows
- Pentest Tools Apk
- Pentest Tools Bluekeep
- Pentest Tools Alternative
- Pentest Tools Free
- Nsa Hack Tools Download
- Hacker
- Hack Apps
- Pentest Tools Subdomain
- Pentest Tools Port Scanner
- Hacker Tools Windows
- Hacker Tools Mac
- Hacker Techniques Tools And Incident Handling
- Pentest Tools Website
- Underground Hacker Sites
- New Hack Tools
- Ethical Hacker Tools
- Pentest Tools Bluekeep
- Hack Rom Tools
- Hacker Tools Software
- Github Hacking Tools
- Hack Tools Online
- Pentest Tools Windows
- Hacking Tools Mac
- How To Install Pentest Tools In Ubuntu
- Pentest Tools Windows
- Install Pentest Tools Ubuntu
- Free Pentest Tools For Windows
- Physical Pentest Tools
- Hack And Tools
- Hack Tools For Pc
- Hacking Tools Windows 10
- Pentest Tools Framework
Mojo Vs Rust, Basic Test And Binary Perspective.