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 word
- Hacker Tools Windows
- Hacker Tools
- Hacker Tools For Pc
- Pentest Tools Linux
- Pentest Tools Subdomain
- Nsa Hack Tools Download
- Blackhat Hacker Tools
- Hack Website Online Tool
- Hack Tools Online
- Hacking Tools Free Download
- Tools Used For Hacking
- Hacker Tools Mac
- Hackers Toolbox
- Hacking Tools Windows
- Hacker Tools Mac
- Hacker Tools For Mac
- Pentest Tools
- Pentest Tools Kali Linux
- Pentest Tools Tcp Port Scanner
- Hacking Tools And Software
- Hack Tools For Ubuntu
- Hack Tools Online
- Hacker Tools Github
- Hacker Tools For Ios
- Hacker Tools Software
- Hacker Tools Windows
- Hacker Tools Github
- Hack Tools 2019
- Blackhat Hacker Tools
- Pentest Tools Nmap
- Hacker Tools Linux
- Pentest Tools Open Source
- Hacker Tools Free
- Hacking Tools For Beginners
- Pentest Tools Open Source
- Hacker Tools Free Download
- What Is Hacking Tools
- Pentest Tools Github
- Easy Hack Tools
- Pentest Tools Online
- Hacking Tools For Pc
- Pentest Tools Free
- Hacking Tools Usb
- Hacking App
- Best Hacking Tools 2020
- Hacking Tools Github
- Hack And Tools
- Pentest Tools Tcp Port Scanner
- Game Hacking
- Ethical Hacker Tools
- Pentest Tools Port Scanner
- Hacker Tools For Mac
- Usb Pentest Tools
- Pentest Tools Website Vulnerability
- Pentest Tools For Windows
- Hacker Tools 2020
- Hack Rom Tools
- Pentest Tools Website Vulnerability
- Hack Tools Mac
- Hacking Tools 2019
- Hacking Tools And Software
- Pentest Tools Linux
- Hacker Tools
- Pentest Tools For Mac
- Pentest Tools Find Subdomains
- Pentest Tools Download
- Black Hat Hacker Tools
- Hacking Tools For Windows
- Pentest Tools Nmap
- Pentest Tools Website
- Install Pentest Tools Ubuntu
- Pentest Tools Apk
- Hack App
- Hacking Tools For Mac
- Tools 4 Hack
- Hack Tools For Mac
- Nsa Hack Tools Download
- Hacker Tool Kit
- Pentest Tools Review
- Free Pentest Tools For Windows
- Hack Tool Apk No Root
- Pentest Tools Port Scanner
- Hacking Tools Github
- Hacker Hardware Tools
- Best Hacking Tools 2019
- Wifi Hacker Tools For Windows
- Hacking Tools Windows
- Hacking Tools For Beginners
- World No 1 Hacker Software
- How To Make Hacking Tools
- Hack App
- Pentest Tools For Windows
- What Is Hacking Tools
- Nsa Hack Tools Download
- Pentest Tools Github
- Hacks And Tools
- Pentest Tools Linux
- Hack Tools Mac
- Growth Hacker Tools
- Top Pentest Tools
- Hacking Tools Hardware
- Hacking Tools For Windows
- Hacker Tools
- Pentest Tools For Windows
- Game Hacking
- Hack Tools Github
- Hacker Tools For Ios
- New Hack Tools
- Pentest Tools Free
- Hacker Tools Apk
- Hack Website Online Tool
- Hacker Tools 2019
- What Is Hacking Tools
- Pentest Tools List
- Hacker Tools Linux
- Pentest Tools Nmap
- Hacking Apps
- Hacker Tools Linux
- Hacker Tools 2019
- Pentest Tools Website Vulnerability
- Hackers Toolbox
- Hak5 Tools
- Pentest Tools Url Fuzzer
- Android Hack Tools Github
- Hacking Tools For Beginners
- Hack Tool Apk
- Pentest Tools Apk
- Hack Website Online Tool
- Pentest Tools Find Subdomains
- Hack App
- Hacking Tools For Games
- Hacking Tools Kit
- Hacker Tools 2019
- Tools 4 Hack
- Hacking Tools For Beginners
- Easy Hack Tools
- Hacking Tools For Pc
- Hacker Tools
- Nsa Hacker Tools
- Hacker Tools Free
- Pentest Tools Free
- Hack Tools Online
- Hacking Tools For Windows 7
- Hacker Tools
- Nsa Hack Tools
- Pentest Tools Kali Linux
- Hacking Tools Windows 10
- Pentest Tools Url Fuzzer
- Hacking Tools For Windows Free Download
- Tools For Hacker
- How To Make Hacking Tools
- World No 1 Hacker Software
- Hack Tools For Pc
- Hacking App
- Hacking Tools For Windows
- Usb Pentest Tools
- Pentest Tools Free
- Growth Hacker Tools
- Hacking Tools 2019
- Hack Tools
- Hacking Tools And Software
- Hacking Tools Download
- Pentest Tools Open Source
- Hacking Tools Software
- Hacking Tools Windows
- Bluetooth Hacking Tools Kali
No comments:
Post a Comment