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
- Hacking Tools For Kali Linux
- Hacker Security Tools
- Hacker Tools For Pc
- Pentest Recon Tools
- Pentest Tools Download
- Hack Website Online Tool
- Hacker Tools
- Hacker
- Hacking Tools For Beginners
- Hacker Tools For Mac
- Best Pentesting Tools 2018
- Usb Pentest Tools
- Hack Tools For Pc
- Hacker Techniques Tools And Incident Handling
- Hacker Tools Mac
- What Are Hacking Tools
- Hack Rom Tools
- Hacking Tools Kit
- Termux Hacking Tools 2019
- Hacker Tools For Ios
- Hacker Tools Free Download
- Pentest Tools Subdomain
- Tools Used For Hacking
- Hacking Tools For Pc
- Tools 4 Hack
- Hacking Apps
- Underground Hacker Sites
- How To Make Hacking Tools
- Hacker Tools
- Hack Tools Mac
- Hack Tools Github
- Blackhat Hacker Tools
- Hacking Apps
- Hacks And Tools
- Hacker Tools For Ios
- Pentest Tools Website
- Hacking Tools 2020
- Install Pentest Tools Ubuntu
- Hacker Tools For Windows
- Hack App
- Hacking Tools For Pc
- Hackrf Tools
- Hacking Tools Windows
- Pentest Tools For Android
- World No 1 Hacker Software
- Pentest Tools Free
- Pentest Tools
- Growth Hacker Tools
- New Hack Tools
- Hacking Tools Online
- Hacker Tools Apk
- Bluetooth Hacking Tools Kali
- Hack Tools Github
- Hacking Tools Online
- Hacking Tools Hardware
- Wifi Hacker Tools For Windows
- Hacking Tools
- Hacking Tools For Games
- Hacker Tools
- Pentest Tools Review
- Hacking Tools For Mac
- Hacker Tools List
- What Are Hacking Tools
- Hacking Tools Github
- Hacker Tool Kit
- Termux Hacking Tools 2019
- Hacking Tools Kit
- Hack Apps
- Easy Hack Tools
- Pentest Tools For Android
- Pentest Tools Subdomain
- Hacking Tools Download
- Kik Hack Tools
- Hacker Tools Github
- Hacking Tools For Games
- Hacker Search Tools
- Hacker Techniques Tools And Incident Handling
- Nsa Hack Tools Download
- Hack Tools Pc
- How To Install Pentest Tools In Ubuntu
- Hacking Tools Software
- Growth Hacker Tools
- Hacker Security Tools
- Hacker Hardware Tools
- Pentest Automation Tools
- Hacks And Tools
- Best Pentesting Tools 2018
- What Is Hacking Tools
- Pentest Tools
- Hacking Tools For Mac
- Hacks And Tools
- Pentest Automation Tools
- Pentest Tools For Ubuntu
- Hacker Tools List
- Hack Tools For Windows
- Pentest Tools List
- Hacker Tools List
- Hacker Tools Hardware
- Nsa Hack Tools
- Free Pentest Tools For Windows
- Hacks And Tools
- Hack Tools For Games
- Hacking Tools 2020
- Hacking Tools For Mac
- Hacker Tools For Windows
- Hacking Tools For Windows Free Download
- Hack Tools Online
- Computer Hacker
- Hacker Tools List
- Pentest Tools Linux
- Hacking Tools For Mac
- Hacking App
- Easy Hack Tools
- Hacking Tools 2020
- Nsa Hack Tools
- Pentest Tools Apk
- Pentest Tools For Android
- Hack Tools For Mac
- Hack Tools For Games
- Hack Tools For Ubuntu
- Hacker Tools Apk
- Easy Hack Tools
- Hack Tool Apk No Root
- Pentest Tools Tcp Port Scanner
- Hacking Tools Online
- Hacking Tools For Windows 7
- Hack Tools Mac
- Android Hack Tools Github
- Hacker Tools Mac
- Hacker Tools 2020
- Hack Tools For Pc
- Pentest Tools List
- Pentest Tools Nmap
- Best Pentesting Tools 2018
- Pentest Tools Linux
- Pentest Tools For Ubuntu
- Hacking Tools For Windows
- Pentest Tools Nmap
- Hacking Tools Github
- Pentest Tools Find Subdomains
- Black Hat Hacker Tools
- Hack Tools 2019
- Tools For Hacker
No comments:
Post a Comment