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 word
- Hacking Tools Free Download
- Beginner Hacker Tools
- Free Pentest Tools For Windows
- Hacker Tools Online
- Hack Apps
- Hacking Tools For Kali Linux
- Pentest Tools Framework
- Nsa Hack Tools
- Hacker Tools Online
- Hacker Tools Mac
- Best Pentesting Tools 2018
- Hacking Tools Software
- Hacking Tools For Games
- Hacker Tools Mac
- Pentest Tools List
- Hacker Tools Mac
- Hacking Tools For Pc
- Install Pentest Tools Ubuntu
- Pentest Tools Linux
- Android Hack Tools Github
- Hack And Tools
- Hacking Tools Free Download
- Hacker Hardware Tools
- Pentest Tools Download
- Hacker
- Pentest Tools Tcp Port Scanner
- Computer Hacker
- Hacker Tools Windows
- Hacking Tools 2019
- Pentest Tools Review
- Physical Pentest Tools
- Hacker Tools For Ios
- Hacking Tools Kit
- Hack Tools For Mac
- Hacker Tool Kit
- Nsa Hack Tools
- Hacking Tools For Pc
- Hacking Tools For Beginners
- World No 1 Hacker Software
- World No 1 Hacker Software
- How To Make Hacking Tools
- Pentest Tools For Ubuntu
- Hacks And Tools
- Hack Rom Tools
- Install Pentest Tools Ubuntu
- Pentest Tools Github
- Hack Tools For Games
- Hack Tool Apk No Root
- Pentest Tools Tcp Port Scanner
- Ethical Hacker Tools
- Hacking Tools For Beginners
- Hack Tools 2019
- Black Hat Hacker Tools
- Pentest Tools For Android
- Hacking Tools For Kali Linux
- Pentest Tools Tcp Port Scanner
- Pentest Tools Find Subdomains
- How To Make Hacking Tools
- Pentest Tools Alternative
- Hacking Tools Github
- Hacker Tools Apk Download
- Pentest Reporting Tools
- Hacking Apps
- Hacking Tools 2019
- Hacker Tools For Ios
- Hacker Tools
- Hacking Apps
- Hacking Tools For Beginners
- Hacker Techniques Tools And Incident Handling
- Hacker Tools Free
- Hacker Tools List
- Pentest Tools Find Subdomains
- Tools 4 Hack
- Hack App
- Pentest Tools Alternative
- Hack Tools Pc
- Hacking Tools Pc
- Best Pentesting Tools 2018
- Best Hacking Tools 2019
- Game Hacking
- Pentest Tools
- Pentest Tools Apk
- Hacker Search Tools
- New Hacker Tools
- Termux Hacking Tools 2019
- Hacking Tools Download
- Hacker
- Hacker Tools 2020
- Hacker
- Hacking Tools
- Hacker Techniques Tools And Incident Handling
- Hacking Tools Mac
- Tools Used For Hacking
- Pentest Automation Tools
- Pentest Tools Bluekeep
- Hacking Tools For Mac
- Hacking Tools Usb
- Hacking Tools For Pc
- Best Pentesting Tools 2018
- Beginner Hacker Tools
- Hack Tool Apk
- Hack Tools For Windows
- Hacking Tools Name
- Hacking Tools For Windows 7
- Hacker Hardware Tools
- Hacker Tools For Ios
- Hacking Tools Mac
- Pentest Tools Url Fuzzer
- Nsa Hack Tools
- Pentest Tools Find Subdomains
- Hacking Apps
- Hacker Tool Kit
- Pentest Tools Online
- Computer Hacker
- Hack Tools For Mac
- Hacking Apps
- Pentest Tools Website
- Pentest Tools For Android
- Hacker Tools Apk Download
- Pentest Tools Port Scanner
- Hacking Tools For Games
- How To Hack
- Pentest Tools Bluekeep
No comments:
Post a Comment