Mojo Vs Rust, Basic Test And Binary Perspective.
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)
More articles
- Physical Pentest Tools
- Pentest Tools List
- Pentest Tools List
- Pentest Reporting Tools
- New Hacker Tools
- Hacking Tools Mac
- Hack Tools Pc
- Hack Website Online Tool
- Hacker Tools Software
- Nsa Hack Tools Download
- Easy Hack Tools
- Hacking Tools For Windows
- Hacking Tools For Windows
- Pentest Tools Find Subdomains
- Hack Tools For Windows
- Hacking Tools Hardware
- Hacking Tools For Windows Free Download
- Hacking Tools Mac
- Computer Hacker
- Hack Apps
- Easy Hack Tools
- Hacking Tools For Beginners
- Pentest Tools Url Fuzzer
- How To Make Hacking Tools
- Hack Tools For Games
- Pentest Tools Kali Linux
- Pentest Tools For Android
- Underground Hacker Sites
- Hacking App
- Pentest Automation Tools
- Best Hacking Tools 2020
- Hacker Tools Software
- Tools 4 Hack
- New Hacker Tools
- Tools Used For Hacking
- Hack Tools Download
- Hacking Tools For Windows 7
- Pentest Tools For Ubuntu
- Termux Hacking Tools 2019
- Hacker Tools Free Download
- Hacking Tools For Beginners
- Pentest Box Tools Download
- Computer Hacker
- Pentest Tools Port Scanner
- Black Hat Hacker Tools
- How To Make Hacking Tools
- Pentest Tools
- World No 1 Hacker Software
- Pentest Reporting Tools
- Nsa Hack Tools Download
- Hack App
- Pentest Tools Download
- Hacking Tools 2019
- Hack Tools For Games
- Hacking Tools For Beginners
- Hacker Techniques Tools And Incident Handling
- Best Hacking Tools 2020
- Tools Used For Hacking
- Hacking Tools For Beginners
- Hacker Tools Apk
- Pentest Tools Github
- Install Pentest Tools Ubuntu
- New Hack Tools
- Hack Tools 2019
- Pentest Tools For Ubuntu
- Hacks And Tools
- Bluetooth Hacking Tools Kali
- Nsa Hack Tools
- Tools Used For Hacking
- Pentest Tools For Windows
- Hacking Tools Name
- Hack Tools Mac
- Pentest Tools Port Scanner
- Hacker Tools Apk Download
- Bluetooth Hacking Tools Kali
- Hacking Apps
- Hacker Tools For Pc
- Pentest Tools Find Subdomains
- Pentest Tools Find Subdomains
- Hacking Tools And Software
- Hacking Tools For Windows 7
- What Is Hacking Tools
- Pentest Tools Github
- Hack Tools Mac
- Pentest Tools Download
- Hacks And Tools
- Hacking Tools Pc
- Tools Used For Hacking
- Hack Tools Online
- Pentest Tools Github
- Tools For Hacker
- Pentest Tools Review
- Pentest Tools Linux
- Hack Tool Apk
- Hack Tools Online
- Hak5 Tools
- Hacking Tools Download
- Pentest Tools Website
- Hacker Tools Apk
- Hacker Tools List
- Hacking Apps
- Hak5 Tools
- Hacker Tools For Pc
- Pentest Recon Tools
- Hack Tools For Mac
- Hacking Tools Kit
- Hack Apps
- Hacker Tools Software
- Pentest Reporting Tools
- Hack Tools Download
- Easy Hack Tools
- Hacking Tools Windows 10
- Pentest Automation Tools
- Hacker Tool Kit
- Hacker Tools 2020
- Wifi Hacker Tools For Windows
- Hack Tools 2019
- Pentest Tools Github
- Bluetooth Hacking Tools Kali
- Pentest Tools Bluekeep
- Pentest Tools Website Vulnerability
- Hack Tools Download
- Wifi Hacker Tools For Windows
- Hack Tools Mac
- Hack Tools
- Pentest Tools For Windows
- Hacker Hardware Tools
- Pentest Tools Bluekeep
- Hacker Tools Linux
- Black Hat Hacker Tools
- What Are Hacking Tools
- What Are Hacking Tools
- Hack Tools Download
- Hack Tools Github
- Easy Hack Tools
- What Are Hacking Tools
- Best Hacking Tools 2019
- Hacking Tools Pc
- Hacking Tools 2020
- Hack Tools For Mac
- Hacking Tools
- Hacking Tools Download
- Blackhat Hacker Tools
- Underground Hacker Sites
- Beginner Hacker Tools
- Install Pentest Tools Ubuntu
- Hacking App
- Game Hacking
- Hacker Techniques Tools And Incident Handling
- Hacker Tools Hardware
- Hacker Tools Mac
- Hacking Tools For Windows 7
- Hacking Tools For Pc
- Hacking Tools For Windows
- Hacking Tools Hardware
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home