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
- Hack Tools Mac
- Best Pentesting Tools 2018
- Hacker Tools Mac
- Free Pentest Tools For Windows
- Pentest Tools Bluekeep
- Pentest Tools Apk
- Underground Hacker Sites
- Hack Apps
- Hacking Tools Name
- Hacking Tools Name
- Kik Hack Tools
- Best Hacking Tools 2020
- Hacking App
- Hack Tools Online
- Hacker Tools Windows
- Hacker Tools For Windows
- Hacker Tools Hardware
- Pentest Tools For Windows
- Hacker Tools Github
- Hacking Tools For Windows Free Download
- Hacker Tools Online
- Black Hat Hacker Tools
- Hacking Tools For Mac
- Pentest Tools Website Vulnerability
- Pentest Tools Open Source
- Hacking Tools Download
- Hackrf Tools
- Hack Tools For Games
- How To Hack
- Pentest Tools Find Subdomains
- Pentest Tools For Mac
- Hacking Tools For Beginners
- What Is Hacking Tools
- Blackhat Hacker Tools
- Pentest Tools Website Vulnerability
- Hacking Tools For Windows Free Download
- Hacker Tools Free Download
- New Hacker Tools
- Hacker Tools For Pc
- Game Hacking
- Hackrf Tools
- Hacker Tools Online
- Hak5 Tools
- Hacking Tools Free Download
- Hacking Tools Hardware
- Hacking Tools Github
- Hacker Tools Free Download
- Hack Tools Mac
- Hack Tools For Windows
- Hacker Tools List
- Hack Tool Apk No Root
- Hacking Tools For Mac
- Pentest Tools Bluekeep
- Hacking Tools 2019
- Hack Tools Download
- Pentest Tools Android
- Pentest Tools Windows
- Pentest Tools Download
- Hacker Tools Apk
- Hacker
- Android Hack Tools Github
- Ethical Hacker Tools
- Pentest Tools For Android
- Termux Hacking Tools 2019
- Hacker Tools 2020
- Hacking Tools Software
- Hack Tools 2019
- Pentest Tools Github
- Hack Tools Github
- Hacker Tool Kit
- Hack Tools For Games
- Hacking Tools For Mac
- Pentest Tools Review
- Top Pentest Tools
- Bluetooth Hacking Tools Kali
- Hacking Tools Mac
- Top Pentest Tools
- World No 1 Hacker Software
- Hacker
- Pentest Recon Tools
- Hacker Tools Mac
- Hak5 Tools
- Hacking Tools Usb
- Pentest Tools
- Pentest Tools Windows
- Hacking Tools Mac
- Pentest Tools Open Source
- Hacker Tools For Pc
- Hacks And Tools
- Hacker Tools Free Download
- Hacker Tools 2019
- Hacking Tools Download
- Hacker Tools Software
- Hacking Apps
- Hacking Tools For Pc
- Hacker Tools Windows
- Pentest Tools
- Hack And Tools
- Hacking Tools Github
- Pentest Tools Online
- Best Hacking Tools 2019
- Hack Tools
- Pentest Tools Website Vulnerability
- How To Install Pentest Tools In Ubuntu
- Physical Pentest Tools
No comments:
Post a Comment