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 For Windows
- Physical Pentest Tools
- Pentest Tools Free
- Pentest Tools Port Scanner
- Bluetooth Hacking Tools Kali
- Hacking Tools Name
- Nsa Hack Tools
- Hacker Tools For Pc
- Hackrf Tools
- Hack Tools For Ubuntu
- Hack Tools Github
- Install Pentest Tools Ubuntu
- Hacker Tools Free
- Kik Hack Tools
- Hacker Tools Mac
- Hack Tools Pc
- Hackrf Tools
- Physical Pentest Tools
- Hacker Tools List
- Hacker Tools Mac
- Computer Hacker
- Hacking Tools Github
- Pentest Tools For Windows
- Pentest Box Tools Download
- Pentest Tools Alternative
- Hack Tool Apk No Root
- Hack Tool Apk No Root
- Hacking Tools For Windows Free Download
- Hack Tool Apk No Root
- Hacking Tools Online
- Hacker Tools Linux
- Nsa Hacker Tools
- Hacker Tools 2019
- Hack Tool Apk
- Pentest Tools Github
- Pentest Tools Framework
- Pentest Tools Url Fuzzer
- Hacker Tools For Ios
- Hack And Tools
- Hack Tool Apk
- Blackhat Hacker Tools
- Usb Pentest Tools
- Hacker Tools For Windows
- Pentest Tools Subdomain
- Pentest Tools Android
- Tools For Hacker
- Hacking Tools Name
- Pentest Tools Find Subdomains
- Hack Tool Apk No Root
- Hack Tools Online
- Pentest Tools Kali Linux
- Hacking Tools Download
- Hacking Tools Name
- Pentest Recon Tools
- Hack Tools Online
- Hacker Tools Apk
- Ethical Hacker Tools
- Hacker Tools For Pc
- Easy Hack Tools
- Hack Website Online Tool
- Pentest Automation Tools
- Pentest Tools Kali Linux
- Best Pentesting Tools 2018
- Hack App
- Termux Hacking Tools 2019
- Pentest Automation Tools
- Pentest Tools Free
- Pentest Tools Port Scanner
- Hacker Tools 2019
- Hacking Tools Kit
- Pentest Tools Download
- Pentest Tools Review
- Pentest Tools For Windows
- New Hacker Tools
- Game Hacking
- Hacker
- Hacking Tools Windows
- Hacking Tools
- Hacker Search Tools
- Hacking Tools For Pc
- Hacker Tools Free
- Pentest Tools Github
- Hack And Tools
- Tools For Hacker
- How To Install Pentest Tools In Ubuntu
- Hacking Apps
- Free Pentest Tools For Windows
- Pentest Tools Free
- Hacking Tools 2020
- Best Hacking Tools 2020
- Pentest Tools For Mac
- Hack Rom Tools
- Pentest Tools Open Source
- Pentest Tools For Mac
- Android Hack Tools Github
- Pentest Tools Github
- Github Hacking Tools
- Hacker Tools For Ios
- Hacking Tools Download
- Hacker Tools For Mac
- Hacker Tools Free
- Hacker Tools For Windows
- Best Hacking Tools 2020
- Hack Tools For Mac
- Physical Pentest Tools
- Ethical Hacker Tools
- Hack Tools For Ubuntu
- Hack Tools For Pc
- Hack Tools For Windows
- Hack Tools Mac
- Hacking Tools And Software
- Hack Tools Download
- Hacker Tools Mac
- Hack Tools For Ubuntu
- Pentest Tools Open Source
- Hacker Tools Apk
- World No 1 Hacker Software
- Pentest Tools Online
- Pentest Tools Url Fuzzer
- Physical Pentest Tools
- Hack Rom Tools
- Pentest Tools Open Source
- Hacking Tools
- Hacker Tools For Pc
- Hacker Hardware Tools
- Hack Tools Mac
- Pentest Reporting Tools
- How To Make Hacking Tools
- Hacker Security Tools
- Ethical Hacker Tools
- Hacking Tools Free Download
- Hacking Tools Hardware
- Hacking Tools Free Download
- Hacker Tools Software
- Pentest Tools Subdomain
- Best Hacking Tools 2020
- Hacking Tools And Software
- Tools For Hacker
- Hacking Tools Name
- Ethical Hacker Tools
- Hacking Tools Kit
- Pentest Tools Url Fuzzer
- Hacker Tools Github
- Hacker Hardware Tools
- Pentest Tools Linux
- New Hacker Tools
- Usb Pentest Tools
- Pentest Tools Free
- How To Install Pentest Tools In Ubuntu
- Pentest Tools Find Subdomains
- Nsa Hacker Tools
- Hak5 Tools
- Pentest Tools Website
- Hacker Tools Linux
- Hacking Tools Mac
- Install Pentest Tools Ubuntu
- Hak5 Tools
- Kik Hack Tools
- Hack Tools
- Pentest Tools List
- Hacker Tools For Windows
No comments:
Post a Comment