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
- Hacker Tools Online
- Hacker Hardware Tools
- Hacking Tools Github
- Pentest Tools Github
- Hack Tools Mac
- Hacker Hardware Tools
- Hack App
- Hacking App
- World No 1 Hacker Software
- Pentest Tools Website Vulnerability
- How To Make Hacking Tools
- Kik Hack Tools
- Pentest Tools Subdomain
- Pentest Box Tools Download
- Best Hacking Tools 2019
- Computer Hacker
- Hak5 Tools
- Beginner Hacker Tools
- Top Pentest Tools
- Hacking App
- Hacker Tools Software
- Hacker Tools Apk Download
- Hacking Tools
- Hacker Security Tools
- Hack Tools
- Hacks And Tools
- Hacker Tools List
- Pentest Automation Tools
- Best Pentesting Tools 2018
- Hacking App
- Hacker Tools For Windows
- Hacking Tools Hardware
- Nsa Hack Tools
- Pentest Tools Github
- Hack Website Online Tool
- Hacking Tools For Pc
- Pentest Tools For Windows
- Nsa Hacker Tools
- Hacking Tools Online
- Hacking Tools Download
- Physical Pentest Tools
- Github Hacking Tools
- Hack Tool Apk
- Hack Tools
- Pentest Recon Tools
- Pentest Tools Windows
- Hacker Tools List
- Hack App
- Hacks And Tools
- Hack Tool Apk No Root
- Pentest Recon Tools
- Game Hacking
- Termux Hacking Tools 2019
- Hack Tools Mac
- Blackhat Hacker Tools
- Usb Pentest Tools
- Nsa Hack Tools Download
- Hack Tools
- Pentest Reporting Tools
- Usb Pentest Tools
- Game Hacking
- Hack Tools For Games
- Android Hack Tools Github
- Hack Tools For Pc
- Hack Tools Pc
- Usb Pentest Tools
- Wifi Hacker Tools For Windows
- Growth Hacker Tools
- Hacking App
- Hacking Tools Windows 10
- New Hacker Tools
- Hacker Tools 2020
- Pentest Tools
- Nsa Hack Tools
- Hacking Tools Pc
- Android Hack Tools Github
- Hacking Tools Free Download
- Growth Hacker Tools
- Hackrf Tools
- Install Pentest Tools Ubuntu
- Pentest Tools Windows
- What Are Hacking Tools
- Physical Pentest Tools
- Hacking Tools For Windows Free Download
- Hacker Tools Apk Download
- Pentest Tools Find Subdomains
- Pentest Recon Tools
- Hacking Tools Download
- Pentest Tools Bluekeep
- Hack Tools For Games
- How To Install Pentest Tools In Ubuntu
- Pentest Tools For Ubuntu
- How To Install Pentest Tools In Ubuntu
- Hacking App
- Hacking Tools Kit
- Pentest Tools Online
- Hack Tools
- Hacking Tools
- How To Make Hacking Tools
- Tools For Hacker
- Hacker Tools Free Download
- Hacking Tools Windows 10
- Pentest Tools Find Subdomains
- New Hacker Tools
- Hack Tools Mac
- How To Install Pentest Tools In Ubuntu
- Pentest Tools For Android
- Pentest Tools Apk
- Hack Tools Github
- Hacking Tools Mac
- Hacker Tools Free
- Hack And Tools
- Install Pentest Tools Ubuntu
- Hack Tools 2019
- Pentest Reporting Tools
- Hacker
- Pentest Tools Review
- Hacking Tools Mac
- Top Pentest Tools
- Hacker Search Tools
- Hacker Tools Hardware
No comments:
Post a Comment