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)
- Pentest Tools Free
- Best Pentesting Tools 2018
- Hacking Tools For Beginners
- New Hacker Tools
- Pentest Tools Find Subdomains
- Hacker
- Hack Tools 2019
- Kik Hack Tools
- Hacking Tools And Software
- Hacking Tools Github
- Hacker Tools Free Download
- Hacker Search Tools
- Growth Hacker Tools
- Usb Pentest Tools
- Hak5 Tools
- Hacking App
- Hacking Tools Windows 10
- Hack Tools For Windows
- Free Pentest Tools For Windows
- Hacker Tools Windows
- Top Pentest Tools
- Hack Tools For Games
- Pentest Tools Windows
- Beginner Hacker Tools
- Hack Tools Online
- Easy Hack Tools
- Hacker Tools Free
- Hacking Tools Windows 10
- Hack App
- Pentest Automation Tools
- Hack Tools For Games
- Pentest Tools Free
- Hacking Tools Windows
- Hacking Tools
- Android Hack Tools Github
- Hacking Tools Usb
- Hacking Tools For Windows Free Download
- What Are Hacking Tools
- Hack Tools For Mac
- Hacker
- Hack Tools For Games
- Pentest Automation Tools
- Hacker Tools Linux
- Best Pentesting Tools 2018
- Hacker Tools For Windows
- Best Hacking Tools 2020
- Nsa Hack Tools Download
- Hacking Tools Software
- Hack Tools For Games
- Hacking Tools For Windows
- Hack Tools For Mac
- Best Hacking Tools 2020
- Hacker Hardware Tools
- Hack Tools For Ubuntu
- Hack Tools
- Best Hacking Tools 2020
- Pentest Tools Apk
- Pentest Tools Nmap
- Hack And Tools
- Pentest Tools Subdomain
- Hacking Tools Github
- Hacking Tools 2020
- Blackhat Hacker Tools
- Hacking Tools For Kali Linux
- Hack App
- Hacking Tools Free Download
- Black Hat Hacker Tools
- Physical Pentest Tools
- Pentest Tools Windows
- Bluetooth Hacking Tools Kali
- Pentest Tools Download
- Hacking Tools For Windows Free Download
- Hack Tools 2019
- Tools 4 Hack
- Beginner Hacker Tools
- Pentest Tools Open Source
- Pentest Tools Android
- Pentest Tools For Windows
- Hacker Tools List
- Easy Hack Tools
- Hacking Tools Usb
- Physical Pentest Tools
- Pentest Tools Tcp Port Scanner
- Hak5 Tools
- What Are Hacking Tools
- Hacking Tools Github
- Pentest Tools Website
- Pentest Tools Github
- Hacker Tools 2019
- What Are Hacking Tools
- Wifi Hacker Tools For Windows
- Hacker Tools Online
- Beginner Hacker Tools
- Hacking Tools Free Download
- Hack Tools For Windows
- Install Pentest Tools Ubuntu
- Hacker Tools 2020
- Android Hack Tools Github
- Beginner Hacker Tools
- Wifi Hacker Tools For Windows
- Hacker Security Tools
- Pentest Tools Website Vulnerability
- Hacking Tools Name
- Hack Tools Download
- Hacking Tools For Windows
- Underground Hacker Sites
- Hak5 Tools
- Hacking Tools Github
- Pentest Tools Framework
- Best Hacking Tools 2020
- Hacking Tools 2019
- What Is Hacking Tools
- Hack Website Online Tool
- Hack Tools Online
- Hacking Tools Name
- Hacking Tools And Software
- Hackrf Tools
- Nsa Hacker Tools
- Hacker Tools Software
- Pentest Tools Online
- Hacking Tools For Pc
- Hacker Tools For Pc
- Pentest Tools Review
- Pentest Box Tools Download
No comments:
Post a Comment