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)
More info
- Hacking Tools Software
- Hacking Tools Usb
- Beginner Hacker Tools
- Hack Tool Apk
- Hack Tools Download
- Beginner Hacker Tools
- Pentest Tools Website Vulnerability
- Wifi Hacker Tools For Windows
- Hak5 Tools
- Computer Hacker
- Bluetooth Hacking Tools Kali
- Blackhat Hacker Tools
- Hacker Tools For Mac
- Hacking Tools And Software
- Top Pentest Tools
- Hacking Tools Kit
- Hacking Tools For Windows Free Download
- Pentest Tools Windows
- New Hacker Tools
- Hacker Tools For Ios
- Pentest Reporting Tools
- Hacking Tools
- Pentest Tools Windows
- Hack Tools Github
- Hack Tool Apk No Root
- Hacker Tools Windows
- Underground Hacker Sites
- What Is Hacking Tools
- Black Hat Hacker Tools
- Game Hacking
- Hack Tools For Windows
- Hack And Tools
- Beginner Hacker Tools
- Hacks And Tools
- Hacker Tools Apk
- Hacker Tools Hardware
- Pentest Tools
- Pentest Box Tools Download
- Hack Rom Tools
- Pentest Tools Open Source
- Hack Tools 2019
- Pentest Recon Tools
- Hacking Tools
- Hacking Tools Name
- Hacker Tool Kit
- New Hacker Tools
- Hacking Tools For Beginners
- Ethical Hacker Tools
- Hacking Tools For Windows
- Hacker Tools For Pc
- Pentest Tools Find Subdomains
- Hak5 Tools
- Hack Apps
- Hacking Tools Windows 10
- Hacking Tools And Software
- Hack Apps
- Hack Tools For Ubuntu
- Hack And Tools
- Blackhat Hacker Tools
- Pentest Tools For Ubuntu
- Hacking Tools For Mac
- Hacker Tool Kit
- Hack Tools Mac
- Hack Rom Tools
- Hack Tools Mac
- What Is Hacking Tools
- Hack Tools Github
- Hackers Toolbox
- Hacking Tools Name
- Hacker Tools 2020
- Pentest Tools
- Nsa Hack Tools Download
- Pentest Tools Review
- Hacker Search Tools
- Hacker Tools For Mac
- Pentest Tools Windows
- Hacker Tools 2020
- Hack And Tools
- Nsa Hacker Tools
- Hacking Tools Hardware
- Tools Used For Hacking
- Pentest Tools Website
- Pentest Tools For Mac
- Hacking Tools Kit
- Ethical Hacker Tools
- Hack App
- Pentest Tools For Android
- Pentest Tools Nmap
- Hacking Tools For Kali Linux
- How To Hack
- Pentest Tools Online
- Hacking App
- Pentest Tools Kali Linux
- Github Hacking Tools
- Hack Tools For Pc
- How To Install Pentest Tools In Ubuntu
- Nsa Hacker Tools
- Tools For Hacker
- Pentest Tools Apk
- Pentest Tools Framework
- Hack Rom Tools
- Pentest Tools Tcp Port Scanner
- Hack Tool Apk No Root
- Pentest Tools Port Scanner
- Hacker Tools Github
- Install Pentest Tools Ubuntu
- Tools For Hacker
- Hacker
- Hack Tools 2019
- Black Hat Hacker Tools
- Hacker Search Tools
- Hack Tools For Pc
- Hack Tools Pc
- Pentest Tools Download
- Github Hacking Tools
- Hack Tools 2019
- How To Make Hacking Tools
- Pentest Tools For Ubuntu
- Hacking Tools Download
- Pentest Tools Open Source
- Pentest Tools Online
- Install Pentest Tools Ubuntu
- Hacking Tools For Windows 7
- Hacking Tools Software
- Hack App
- Hacker Tools For Mac
- Hacker Tools Github
- New Hacker Tools
- Hacking Tools And Software
- How To Install Pentest Tools In Ubuntu
- Pentest Tools Free
- Free Pentest Tools For Windows
- Hack Tool Apk No Root
- Hacker Tools For Mac
- Hacker Tool Kit
- Hacking Tools For Beginners
- Pentest Tools Free
- Pentest Recon Tools
- Hacker Tools 2020
- Hacker Tool Kit
- Pentest Tools For Mac
- Hack Apps
- Hacking Tools 2019
- Pentest Tools Review
No comments:
Post a Comment