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 information
- Pentest Tools
- Pentest Tools List
- Game Hacking
- Growth Hacker Tools
- What Are Hacking Tools
- Pentest Tools For Windows
- Pentest Tools Download
- How To Hack
- Hacking Tools For Beginners
- Hackrf Tools
- Tools Used For Hacking
- Hacker
- Hacking Tools Usb
- Pentest Tools Website
- Tools 4 Hack
- Hack Tools Pc
- Pentest Box Tools Download
- Pentest Tools Download
- Pentest Tools Subdomain
- Nsa Hack Tools
- Termux Hacking Tools 2019
- Hacking Tools For Windows 7
- Nsa Hacker Tools
- Pentest Tools Bluekeep
- Hacking Tools Online
- Hack Rom Tools
- Pentest Tools Find Subdomains
- Pentest Tools Windows
- Hacker Tools For Mac
- Hacking Tools For Games
- Pentest Tools Nmap
- Hacking Tools For Kali Linux
- Hacking Tools For Pc
- Hack Tools For Pc
- Hacker Tools List
- Hacker Tools Online
- Easy Hack Tools
- Hacker Tools For Mac
- Hacking Tools Free Download
- Black Hat Hacker Tools
- Hack Tools
- Pentest Tools Find Subdomains
- Hacker Tools For Windows
- Pentest Tools Subdomain
- Top Pentest Tools
- Hacking Tools Kit
- Hack Apps
- Hackers Toolbox
- How To Make Hacking Tools
- Wifi Hacker Tools For Windows
- Pentest Tools Tcp Port Scanner
- Hacker Security Tools
- Hacker Tools Apk Download
- Pentest Tools Open Source
- Easy Hack Tools
- Pentest Tools Nmap
- Hack Tool Apk
- Hack Tools For Games
- Termux Hacking Tools 2019
- What Are Hacking Tools
- Pentest Tools Online
- Pentest Tools Alternative
- Hacker Tools 2019
- Hackers Toolbox
- Pentest Tools For Windows
- Pentest Reporting Tools
- Hack Tools For Ubuntu
- Hacking Tools Software
- Pentest Tools Apk
- Pentest Tools
- Top Pentest Tools
- Hack Tools Pc
- Hacker Tools Github
- Pentest Tools Download
- Kik Hack Tools
- Hacking Tools Name
- Pentest Recon Tools
- Nsa Hack Tools Download
- Hack Tools For Ubuntu
- Pentest Tools For Mac
- Hacking Tools For Mac
- Hacking Tools Usb
- Growth Hacker Tools
- Hacker Tools Software
- Pentest Tools Windows
- Pentest Tools Review
- Nsa Hacker Tools
- Hacking Tools 2019
- Growth Hacker Tools
- Best Pentesting Tools 2018
- Pentest Tools List
- Hacking Tools Download
- Pentest Tools Open Source
- Hacking Tools Name
- Pentest Tools Url Fuzzer
- New Hack Tools
- Pentest Tools Open Source
- Hacking Tools For Games
- Pentest Tools Website
- Pentest Tools Alternative
- Nsa Hack Tools Download
- Hacker Hardware Tools
- Hacking Tools Kit
- Hack Tools Github
- Hacking Tools
- Pentest Tools Find Subdomains
- Hacking Tools
- How To Hack
- Hack Tools Github
- Hacking Tools Usb
- Hacker Tools For Ios
- Wifi Hacker Tools For Windows
- Hacking Tools
- Easy Hack Tools
- Hacking Tools And Software
- Hacker Tools For Pc
- Install Pentest Tools Ubuntu
- Easy Hack Tools
- Hacking Tools Windows
- Best Hacking Tools 2020
- Termux Hacking Tools 2019
- Hack And Tools
- Hacker Tools Github
- Hacking Tools Windows 10
- Hacker Tools Apk
- Hacking Tools 2020
- Black Hat Hacker Tools
- Pentest Tools For Ubuntu
- Pentest Tools For Mac
- Hacking Tools Hardware
- Easy Hack Tools
- Install Pentest Tools Ubuntu
- How To Hack
- Hack Tools Github
- Hack Tools For Mac
- Kik Hack Tools
- Hacker Tools For Windows
- Hacking Tools Kit
- Hack Tools
- Pentest Tools Github
Nenhum comentário:
Postar um comentário