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
- Hacker
- Hacking Tools 2019
- Pentest Tools Linux
- World No 1 Hacker Software
- Hacking Tools
- Physical Pentest Tools
- Hacker Tools List
- Hacking Tools For Windows
- Game Hacking
- Hacking Tools For Windows Free Download
- Hacking Apps
- Free Pentest Tools For Windows
- How To Make Hacking Tools
- Hacker Tools 2020
- How To Hack
- Pentest Tools List
- Pentest Tools For Ubuntu
- Hacking Tools Windows 10
- Hacker Tools For Mac
- Hacker Tools Software
- Hacking Tools For Beginners
- Top Pentest Tools
- Pentest Tools Free
- Growth Hacker Tools
- Pentest Tools Android
- Hacker Tools For Pc
- New Hack Tools
- Hack Tools Online
- Hack Tool Apk No Root
- Hacking Tools Name
- Pentest Tools Open Source
- Hack Tools For Ubuntu
- Easy Hack Tools
- Hacking Tools 2019
- Pentest Tools Alternative
- Hacker Tools
- Hacker Tools Windows
- Hacking Tools For Windows
- Nsa Hack Tools Download
- Hack App
- Pentest Tools Url Fuzzer
- Hacking Tools For Games
- Hacker Tools Free
- Termux Hacking Tools 2019
- Best Hacking Tools 2020
- Pentest Tools Windows
- Hacking Tools Download
- Best Hacking Tools 2020
- Pentest Tools Url Fuzzer
- Hacker Tools Windows
- Hacker Techniques Tools And Incident Handling
- Ethical Hacker Tools
- Hacking Tools For Games
- Hack Tools 2019
- Pentest Tools Website Vulnerability
- Physical Pentest Tools
- Hacking Tools Windows
- Hacking Tools
- Best Hacking Tools 2020
- Hacking Tools For Pc
- Pentest Tools Tcp Port Scanner
- Hacker Tools Linux
- Hacking Tools For Windows 7
- Tools For Hacker
- Nsa Hack Tools Download
- Game Hacking
- Hacking Tools
- Top Pentest Tools
- Hack Tools
- Growth Hacker Tools
- Hacker Tools Software
- How To Hack
- Pentest Tools Github
- How To Install Pentest Tools In Ubuntu
- Hacker Tools Github
- Hacker Tools For Mac
- Pentest Tools For Mac
- Android Hack Tools Github
- Hacking Tools
- Physical Pentest Tools
- Hacking Tools 2019
- Kik Hack Tools
- Beginner Hacker Tools
- Hacking Apps
- Hacker Tools Online
- Pentest Tools Alternative
- Hack Tools For Ubuntu
- Hacking Tools For Windows Free Download
- Physical Pentest Tools
- What Are Hacking Tools
- Hacking Tools For Beginners
- Hack Website Online Tool
- Computer Hacker
- Wifi Hacker Tools For Windows
- Hacking Tools
- Hacking Tools Windows
- Hacking App
- Hacking Apps
- Hacker Search Tools
- Pentest Tools Github
- Easy Hack Tools
- Hacking Tools For Windows 7
- Hacker Tools Apk Download
- Pentest Tools Website Vulnerability
- Bluetooth Hacking Tools Kali
- Hacking Tools And Software
- Tools For Hacker
- Underground Hacker Sites
- Github Hacking Tools
- Hack Tools For Ubuntu
- Hacking Tools And Software
- Pentest Tools Nmap
No comments:
Post a Comment