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 articles
- Pentest Tools Website
- Hack App
- Hack Tool Apk No Root
- Pentest Tools Android
- Hacker Tools Online
- Top Pentest Tools
- Hacker Tools 2019
- Hacking Apps
- Hack Tools For Windows
- Pentest Tools Review
- Hacking Tools Kit
- Pentest Tools Open Source
- Hacker Search Tools
- Pentest Tools Github
- Tools For Hacker
- Nsa Hacker Tools
- Hacker Tool Kit
- Pentest Tools For Mac
- Hack Website Online Tool
- Android Hack Tools Github
- Hacking Tools Kit
- Underground Hacker Sites
- Hacking Tools Download
- How To Make Hacking Tools
- Easy Hack Tools
- Hacker Tools Github
- Pentest Tools Download
- Hack Tools For Ubuntu
- Pentest Box Tools Download
- Hack Apps
- Pentest Tools For Android
- Pentest Reporting Tools
- Hacking Tools For Kali Linux
- Hacker Tools Github
- Hack Tools Online
- Wifi Hacker Tools For Windows
- Tools Used For Hacking
- Pentest Tools Tcp Port Scanner
- Hack Tools For Games
- Install Pentest Tools Ubuntu
- Pentest Tools Kali Linux
- Top Pentest Tools
- Pentest Tools For Android
- Computer Hacker
- Pentest Tools Website
- Hacking Apps
- Hacker Tool Kit
- Hack Apps
- Computer Hacker
- Hack Tool Apk No Root
- Hack Tools Online
- Usb Pentest Tools
- Hacking Tools Usb
- Pentest Reporting Tools
- Pentest Tools For Windows
- Hacking Tools 2020
- Hacker Tools For Mac
- Pentest Tools Review
- Pentest Tools Android
- Hacker Tools Apk
- Hacker Tools Free Download
- Hak5 Tools
- Hacking Tools Software
- Hacking Tools Github
- Hack Tools For Games
- Hacking Tools Online
- What Is Hacking Tools
- Hacker
- Pentest Tools Url Fuzzer
- Pentest Tools Github
- Hacking Tools Free Download
- Hacker Tools Software
- Bluetooth Hacking Tools Kali
- Wifi Hacker Tools For Windows
- Pentest Tools For Ubuntu
- Top Pentest Tools
- Hacker Tools Online
- Hacking Tools Usb
- Pentest Tools Kali Linux
- Hack Rom Tools
- Pentest Tools Subdomain
- Hacker Tools Windows
- How To Install Pentest Tools In Ubuntu
- Hacking Tools For Windows Free Download
- Hacking Tools
- Pentest Tools Subdomain
- Pentest Tools Website Vulnerability
- What Are Hacking Tools
- Pentest Tools Bluekeep
- Hack Tools Online
- Hack Website Online Tool
- Pentest Tools Website
- Top Pentest Tools
- Hacking Tools For Windows Free Download
- Hacking Tools For Windows 7
- Hack Tools For Games
- Hack Rom Tools
- How To Hack
- What Is Hacking Tools
- Hack Tools For Games
- What Are Hacking Tools
- Pentest Tools Github
- Hacker Tools Apk Download
- Hacker Tools Apk Download
- Top Pentest Tools
- Hack Website Online Tool
- Hacker Tools Free
- Hack And Tools
- Hack Tools Mac
- Hacking Tools Name
- Hacking Tools Name
- Hack Tool Apk
- Hacker Tools Github
No comments:
Post a Comment