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)
Continue reading
- Hack Tools For Games
- Hacker Tools Apk Download
- Hacking Tools For Windows Free Download
- Hacker Tool Kit
- Hacker Tools For Pc
- Physical Pentest Tools
- Hackrf Tools
- Usb Pentest Tools
- Pentest Tools Online
- Pentest Tools Website Vulnerability
- Hack Apps
- Hacking App
- Pentest Tools For Ubuntu
- World No 1 Hacker Software
- Hacker Tools Apk
- Hacking Tools For Mac
- Bluetooth Hacking Tools Kali
- Hacker Tool Kit
- Hacker Tools For Mac
- How To Make Hacking Tools
- Best Hacking Tools 2019
- Pentest Tools Nmap
- Pentest Tools For Mac
- Pentest Tools Website
- Hacking Tools For Mac
- How To Install Pentest Tools In Ubuntu
- Hacking Tools Download
- Pentest Tools Apk
- Pentest Tools Website Vulnerability
- Hacking App
- Tools Used For Hacking
- What Are Hacking Tools
- Usb Pentest Tools
- Hacker Tools Online
- Hacking Tools Download
- Hacking Tools Free Download
- Hacker Tools Free Download
- Usb Pentest Tools
- Hacking Tools Free Download
- Hack Tools
- Best Pentesting Tools 2018
- Termux Hacking Tools 2019
- Pentest Tools List
- Nsa Hacker Tools
- Computer Hacker
- Hacker Hardware Tools
- Hacker Hardware Tools
- Hackers Toolbox
- Ethical Hacker Tools
- Growth Hacker Tools
- Hacking Tools Mac
- Beginner Hacker Tools
- Pentest Tools Apk
- Hacking Tools For Mac
- Hacking Tools For Windows 7
- Hacker Tools For Pc
- Hacking Tools Hardware
- Hack Tools 2019
- Hacking Tools Hardware
- Hacker Tools For Pc
- How To Install Pentest Tools In Ubuntu
- Hacking Tools Windows
- Free Pentest Tools For Windows
- Nsa Hack Tools
- Hacker Tools For Mac
- Hacker Tool Kit
- Hack Tools Online
- Pentest Tools Find Subdomains
- New Hack Tools
- Beginner Hacker Tools
- Hacking Tools Kit
- Hack Tools Github
- Pentest Tools For Windows
- Pentest Tools Website Vulnerability
- Hack Website Online Tool
- Wifi Hacker Tools For Windows
- Hack Rom Tools
- Hack Tools Download
- Termux Hacking Tools 2019
- Usb Pentest Tools
- Hacking Tools For Beginners
- Pentest Tools Tcp Port Scanner
- Pentest Recon Tools
- Pentest Tools Alternative
- Hack Rom Tools
- Hacking Tools Github
- How To Install Pentest Tools In Ubuntu
- Hacking Tools Download
- Hacking Tools Free Download
- Hack Tools Online
- Pentest Tools Review
- Tools 4 Hack
- Blackhat Hacker Tools
- Hack Tools Download
- Hack Tool Apk
- New Hacker Tools
- Hack Rom Tools
- Best Hacking Tools 2020
- Pentest Tools Open Source
- Hack Tools For Games
- Hacking Tools And Software
- Install Pentest Tools Ubuntu
- Hacker Hardware Tools
- Pentest Tools Github
- Hacking Tools Github
- Pentest Tools Tcp Port Scanner
- Physical Pentest Tools
- How To Make Hacking Tools
- Usb Pentest Tools
- Pentest Tools Review
- Best Pentesting Tools 2018
- New Hacker Tools
- Hacking Tools Pc
- Pentest Reporting Tools
- Hack Tools Download
- Pentest Automation Tools
- Hacker Tools For Pc
- Pentest Tools Kali Linux
- Hack Tools For Windows
- Github Hacking Tools
- Hack Tools For Games
- Hacking Tools Download
- Pentest Tools Url Fuzzer
- Pentest Reporting Tools
- Pentest Tools Framework
- Hack Apps
- Pentest Tools Free
- Hacking Tools 2020
- Hacking Tools Software
No comments:
Post a Comment