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
- Pentest Tools Free
- Pentest Tools Linux
- Pentest Tools Review
- Hacking Tools For Games
- Pentest Tools Subdomain
- Bluetooth Hacking Tools Kali
- Tools For Hacker
- Hacking Tools For Windows Free Download
- Pentest Tools Url Fuzzer
- Hack Tools For Pc
- Hacker Tools 2020
- Nsa Hack Tools Download
- Hacker Hardware Tools
- Pentest Tools List
- Github Hacking Tools
- Hack Tools 2019
- Pentest Tools Bluekeep
- New Hacker Tools
- Nsa Hack Tools
- Black Hat Hacker Tools
- Hacking Tools Online
- Hacker Tools Windows
- Hacker Security Tools
- Pentest Tools Nmap
- Hacker Hardware Tools
- Pentest Tools Find Subdomains
- Best Pentesting Tools 2018
- Underground Hacker Sites
- Hacking Tools For Windows 7
- Pentest Tools Linux
- Pentest Tools Bluekeep
- Usb Pentest Tools
- Github Hacking Tools
- Hacking Tools Github
- Top Pentest Tools
- Hack Rom Tools
- Hacker Tools Online
- Pentest Tools Alternative
- Hacker Tools 2019
- Hack Apps
- Hacking Tools Github
- Pentest Tools For Mac
- Pentest Tools Website
- Hack Tool Apk
- Hacker Tools List
- Pentest Tools Linux
- Pentest Tools For Mac
- Physical Pentest Tools
- Pentest Tools Alternative
- Hacking Tools 2019
- Hacking Tools 2019
- Hacking Tools Kit
- Blackhat Hacker Tools
- Hacking Tools For Beginners
- Github Hacking Tools
- Hacking Tools Online
- Hacking Tools 2019
- Wifi Hacker Tools For Windows
- Pentest Tools Alternative
- Pentest Tools Url Fuzzer
- Pentest Box Tools Download
- Pentest Tools For Mac
- Pentest Tools Windows
- Hacking Tools Download
- Hacker Tools For Mac
- Pentest Tools Bluekeep
- Pentest Tools Review
- Hacking App
- Pentest Reporting Tools
- Hack Tools Mac
- Hack Tools Download
- Pentest Tools
- Hacker Tools Mac
- How To Hack
- Computer Hacker
- Hacking Tools
- Hack Tool Apk
- Hacker Tools 2020
- Hack Tools For Mac
- Physical Pentest Tools
- Hack Tools
- Hacking Tools For Kali Linux
- Pentest Tools Bluekeep
- Pentest Tools Kali Linux
- Hack Tools
- Hacking Tools For Pc
- Pentest Tools Free
- Hacker Tools Free
- Hacker Tools Linux
- Hack App
- Hacking Tools For Games
- Hacking Tools 2019
- Beginner Hacker Tools
- Hacking Tools For Beginners
- Kik Hack Tools
- Hak5 Tools
- Ethical Hacker Tools
- Hacker Search Tools
- Physical Pentest Tools
- Kik Hack Tools
- Pentest Tools For Android
- Pentest Tools For Android
- Hack Rom Tools
- Hack Tool Apk
- World No 1 Hacker Software
- Pentest Tools For Android
- Hacker Tools Linux
- Hacker Tools For Windows
- Hacker Tools For Mac
- Pentest Recon Tools
- Hacker Tools Software
- How To Hack
- Hack Tools For Pc
- Hacker Tools Free
- Hacker Tools Free Download
- Hacking Apps
- Hacker Hardware Tools
- Pentest Tools For Ubuntu
- Hacking Tools Name
- Pentest Tools Bluekeep
- Hacking Tools For Games
- Github Hacking Tools
- Hack Tools Pc
- Pentest Tools Website
- Termux Hacking Tools 2019
- Pentest Tools For Android
- Hacking Tools Usb
- Pentest Tools Open Source
- Hacker Tools Free
- Hacker Tools Free Download
- Hacking Tools Github
No hay comentarios:
Publicar un comentario