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 news
- What Is Hacking Tools
- Tools 4 Hack
- Hacking Apps
- Hacker Tools Apk Download
- Hacker Tools 2019
- Hacker Tools For Windows
- Hacking Tools
- Hacking Tools For Windows 7
- What Are Hacking Tools
- Free Pentest Tools For Windows
- Tools For Hacker
- Pentest Tools For Android
- Hackrf Tools
- Pentest Tools Website
- Hack And Tools
- Pentest Tools For Ubuntu
- Hacker Tools Software
- Hacker Tools For Ios
- Pentest Tools Download
- Hacking Tools
- Hack Tools Download
- Hacking Tools Online
- Best Hacking Tools 2019
- Nsa Hack Tools Download
- Hack Tools For Mac
- Hack Tools For Games
- Hack Tools
- Hacker Tools Hardware
- Hackrf Tools
- Hacker Tool Kit
- Hacking Tools Download
- Hacker Tools For Windows
- Hacking Tools Windows 10
- Hacker Tools Mac
- Hacks And Tools
- Hack Apps
- Hack App
- Pentest Tools
- Pentest Tools Subdomain
- Hacker Tools Online
- Top Pentest Tools
- Hacking Tools Free Download
- Hackrf Tools
- Best Pentesting Tools 2018
- Hacking Tools 2020
- Black Hat Hacker Tools
- Hack Tools Download
- Hack Tools For Mac
- Hacker Tools Linux
- Tools Used For Hacking
- Hacking Tools For Windows Free Download
- Hack And Tools
- Pentest Tools For Mac
- Hacking Tools For Windows
- Hacking Tools Download
- Hacker Tools
- Ethical Hacker Tools
- Hacking Tools Kit
- Hacks And Tools
- Pentest Tools For Android
- Blackhat Hacker Tools
- Hacker Tools Mac
- Hacking Tools Kit
- Tools Used For Hacking
- Hack Tools Mac
- How To Make Hacking Tools
- Hackers Toolbox
- Hack Tools
- Hack Tools For Pc
- Pentest Recon Tools
- Hacker Tools Hardware
- Hacker Tools
- Hacking Tools And Software
- Hack Rom Tools
- Easy Hack Tools
- Hacking Tools For Mac
- Hacking Tools Pc
- Usb Pentest Tools
- Pentest Tools Website Vulnerability
- Kik Hack Tools
- Pentest Tools Apk
- Pentest Tools Url Fuzzer
- Hack Tools For Pc
- Pentest Tools Url Fuzzer
- Hack Apps
- Hacker Hardware Tools
- Pentest Reporting Tools
- Hacker Techniques Tools And Incident Handling
- Hack Tools For Pc
- Hack Tools For Windows
- Hacker Search Tools
- Hacker Tools Windows
- Pentest Tools Website
- Hacking Tools
- Usb Pentest Tools
- Hacking Apps
- Hacker Tools Mac
- Hacker Tools Github
- How To Install Pentest Tools In Ubuntu
- Hacking Tools For Windows Free Download
- Best Hacking Tools 2020
- Best Hacking Tools 2019
- Pentest Tools Review
- Hacking Tools Online
- Hack Tools Download
- Hacking Tools 2019
- Pentest Tools
- Hacker Security Tools
- Hack Rom Tools
- Pentest Tools For Android
- Hacking Tools 2019
- Hack Apps
- Hacking Tools Windows
- Hacker Tools Windows
- Hack Website Online Tool
No comments:
Post a Comment