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)
- Hack Tools For Mac
- Hacker Tools
- Hacker Tools Hardware
- Hacking Tools Online
- Computer Hacker
- What Are Hacking Tools
- Hack Tools
- Pentest Tools For Windows
- Kik Hack Tools
- Hacker Tools List
- Hacker Tools 2019
- Hack Tools Online
- Hacking Tools Pc
- Hacker Tools Linux
- Game Hacking
- Tools For Hacker
- Pentest Tools For Ubuntu
- Hacking Tools For Beginners
- Hack Tools
- Hack Tools Github
- Pentest Tools Nmap
- Black Hat Hacker Tools
- Computer Hacker
- Hacker Tools For Ios
- Hacker Tools Github
- Hacker Tools Hardware
- Hacking Tools For Windows 7
- Hacking Tools Kit
- Pentest Tools Framework
- Pentest Tools
- Hack Tool Apk No Root
- Pentest Tools For Windows
- Pentest Tools Website
- Hackrf Tools
- Hacker Tools Apk Download
- Hack Tools For Pc
- How To Install Pentest Tools In Ubuntu
- Hacker Tools For Pc
- Pentest Tools Linux
- What Is Hacking Tools
- Pentest Tools Website
- Pentest Tools Linux
- Github Hacking Tools
- Ethical Hacker Tools
- Hacking Tools Hardware
- Best Hacking Tools 2019
- Hacker Tools Windows
- Hacker Tools List
- Pentest Tools Subdomain
- Pentest Tools Url Fuzzer
- Hack Tools For Ubuntu
- Underground Hacker Sites
- Pentest Tools Windows
- Hacking Tools For Games
- Hacking Tools Online
- Hacker Hardware Tools
- Pentest Tools Review
- Nsa Hacker Tools
- Nsa Hacker Tools
- Pentest Tools Port Scanner
- Computer Hacker
- Hacker Hardware Tools
- Blackhat Hacker Tools
- New Hack Tools
- Hacking App
- Hacking Tools Mac
- Pentest Box Tools Download
- Hacking Tools 2019
- Hack Tools Download
- Hak5 Tools
- Pentest Tools Find Subdomains
- Pentest Tools For Android
- Hack Tools 2019
- Computer Hacker
- Pentest Tools For Mac
- Hackrf Tools
- Hacking Tools Hardware
- Github Hacking Tools
- Hacking Tools Windows 10
- Growth Hacker Tools
- Hack Rom Tools
- Hack Tools For Windows
- Best Hacking Tools 2020
- Hacker Tools For Mac
- Hack Rom Tools
- Hacker Tools Online
- Hacker Tools 2020
- Pentest Automation Tools
- Hacking Tools For Windows 7
- Hacking Tools Windows 10
- Pentest Tools Windows
- Pentest Tools For Ubuntu
- Hack Tools Mac
- Black Hat Hacker Tools
- Pentest Tools Tcp Port Scanner
- Hacking App
- Pentest Tools Website Vulnerability
- Hacker Hardware Tools
- Pentest Automation Tools
- Best Pentesting Tools 2018
- Hack App
- Hacker Tools For Pc
- Pentest Tools For Mac
- Pentest Tools Tcp Port Scanner
- Pentest Tools Free
- Hacking Tools Online
- Pentest Tools Find Subdomains
- Hacking Tools For Windows
- How To Install Pentest Tools In Ubuntu
- Hacking Tools Github
- Hacking Tools For Games
- Hacker Tools List
- Hacker Techniques Tools And Incident Handling
- Hacker Tools Github
- Hacker Tools Software
- Best Hacking Tools 2020
- Pentest Tools Url Fuzzer
- Best Hacking Tools 2020
- Pentest Tools For Ubuntu
- Hack Tools Mac
- Hacking Tools And Software
- Hacking Tools Download
- Hacker Tool Kit
No hay comentarios:
Publicar un comentario