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)
Related links
- Hack Tools
- How To Install Pentest Tools In Ubuntu
- Nsa Hacker Tools
- Best Pentesting Tools 2018
- Underground Hacker Sites
- Pentest Tools Port Scanner
- Pentest Tools Windows
- Hack Tools For Windows
- Tools 4 Hack
- Hack Apps
- Pentest Tools Online
- Hacking Tools For Windows Free Download
- Game Hacking
- Hack Tools For Ubuntu
- Growth Hacker Tools
- Hacking Tools For Kali Linux
- Hacker Tools Windows
- Hak5 Tools
- Top Pentest Tools
- Hacking Tools For Kali Linux
- Best Hacking Tools 2020
- Hack Tools For Mac
- Pentest Tools Kali Linux
- Pentest Tools
- Pentest Recon Tools
- Hacker
- Pentest Tools Apk
- Hacking App
- Termux Hacking Tools 2019
- Underground Hacker Sites
- Hackrf Tools
- Hack Tool Apk
- Free Pentest Tools For Windows
- Hacker Tools Software
- Hak5 Tools
- Hacking Tools Download
- Hack Tools For Mac
- Hacking Tools Kit
- Hacker Tools For Mac
- Hacking Tools Usb
- Hacker Search Tools
- Pentest Automation Tools
- Hacking App
- Hacker Tools For Mac
- How To Make Hacking Tools
- Hacking Tools 2019
- Pentest Tools Port Scanner
- Hacker Tools 2020
- Blackhat Hacker Tools
- Pentest Tools List
- Hack Tools
- Hacking Tools 2020
- Hacker Tools Free Download
- Hacker Search Tools
- Hack Tools For Games
- Underground Hacker Sites
- Nsa Hacker Tools
- Hacking Tools For Kali Linux
- Pentest Tools Url Fuzzer
- Hacker Search Tools
- World No 1 Hacker Software
- Physical Pentest Tools
- Hacker Tools Windows
- Pentest Tools For Mac
- Pentest Tools Apk
- Easy Hack Tools
- Hacker Tools For Windows
- Hacker Tools List
- Hacker Tools Hardware
- Hack Tools For Windows
- Pentest Tools For Mac
- Pentest Tools Windows
- Pentest Box Tools Download
- Pentest Tools Subdomain
- Black Hat Hacker Tools
- Tools Used For Hacking
- Hack Tools For Pc
- Pentest Tools Android
- Hack Tools For Windows
- Hacking Tools And Software
- Free Pentest Tools For Windows
- How To Hack
- Hackrf Tools
- Hack Tools For Windows
- Pentest Tools Tcp Port Scanner
- Hacking Tools For Games
- Hackers Toolbox
- Hacker Tools For Pc
- Hack Tools For Pc
- Tools 4 Hack
- Pentest Tools Linux
- Hacker Tools Apk Download
- Hack Website Online Tool
- Hacker Tools 2020
- Nsa Hacker Tools
- Bluetooth Hacking Tools Kali
- Hacker Tools 2020
- Hacks And Tools
- Hacker Tools List
- Nsa Hack Tools
- Hacker Techniques Tools And Incident Handling
- Hack Tools For Mac
- Easy Hack Tools
- Best Hacking Tools 2019
- Hacker Tools Hardware
- Pentest Tools Online
- Hack Tool Apk
- Pentest Tools Url Fuzzer
- Hacker Tools Linux
- Game Hacking
- Hacking Tools For Games
- Hacking Tools Mac
- Best Hacking Tools 2020
- Pentest Automation Tools
- Beginner Hacker Tools
- Usb Pentest Tools
- Hacker
- Hacker Tools Github
- Pentest Tools Linux
- Hack Tool Apk No Root
- Pentest Tools Download
- Hacking Tools
- Hacking Tools Pc
- Pentest Tools Subdomain
- Hack Tools Online
- Hacker Tools Github
- Hacker Tools List
- Hacking Tools For Kali Linux
- Blackhat Hacker Tools
- Hacker Tools Windows
- Hack App
- Physical Pentest Tools
- Hacker Tools Online
- Hacking Tools Name
- Hacker Security Tools
- Hack Tools Online
- Pentest Tools Free
- Hacker Tools For Mac
- Nsa Hack Tools Download
- Hacking Tools Download
- Pentest Tools For Android
- Hacking Tools For Games
- Pentest Tools Website Vulnerability
- Hacker Tools For Mac
- Top Pentest Tools
- Pentest Tools Online
- Hacking Tools Download
- New Hack Tools
- Hacking Tools 2020
- Pentest Tools Download
- Pentest Tools Review
- Hacker Hardware Tools