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 links
- Hack Tools
- Hacker Tools Linux
- Black Hat Hacker Tools
- Hacker Tools Apk Download
- How To Hack
- Hack Tools Mac
- Hack And Tools
- Nsa Hack Tools
- Pentest Tools Online
- Hacker Tools List
- Hacking Tools Pc
- Pentest Recon Tools
- Android Hack Tools Github
- Tools Used For Hacking
- Pentest Tools
- Hacker
- Hacking Tools Github
- Hacking Tools Windows 10
- Hackrf Tools
- Best Pentesting Tools 2018
- Hack Tools For Mac
- Nsa Hack Tools
- Pentest Automation Tools
- Hacker Tools Apk Download
- Pentest Tools Url Fuzzer
- Physical Pentest Tools
- Pentest Tools Website Vulnerability
- Hacker Tools For Windows
- Underground Hacker Sites
- Hacking Tools For Beginners
- Hacker
- Pentest Automation Tools
- Android Hack Tools Github
- Hacker Tools 2019
- Hacking Tools Hardware
- Hacker Tools Apk
- Hacker Tools 2019
- Hacking App
- Hacking Tools Pc
- Hak5 Tools
- Hack And Tools
- Hack Tools For Mac
- Hacking Tools Kit
- Hacker Tools Mac
- Pentest Tools Kali Linux
- Hacker Tools Linux
- Best Pentesting Tools 2018
- Pentest Tools Open Source
- Hacking Tools Github
- Hacker Tools Apk Download
- Hack Tools For Pc
- Hack Tools For Ubuntu
- Nsa Hack Tools
- Hack Tools For Ubuntu
- Hacker Tools Apk
- Pentest Automation Tools
- Hacker Tools For Pc
- Ethical Hacker Tools
- Hacker Tools Github
- How To Install Pentest Tools In Ubuntu
- Hacker Search Tools
- Pentest Tools For Windows
- Hacking Tools Download
- Pentest Tools Website Vulnerability
- Pentest Tools For Mac
- What Is Hacking Tools
- Beginner Hacker Tools
- Install Pentest Tools Ubuntu
- Hacker Tools Hardware
- Pentest Tools Windows
- Hack Tools Github
- Hacking Tools Software
- Hacking Tools Download
- Usb Pentest Tools
- Easy Hack Tools
- Hack Tool Apk No Root
- Hack Tools For Games
- Pentest Tools For Ubuntu
- Best Hacking Tools 2019
- Nsa Hack Tools Download
- Hack Tool Apk No Root
- Hack Tool Apk No Root
- Pentest Tools Url Fuzzer
- Hacking Tools Online
- Kik Hack Tools
- Hacker Tools List
- Hacking App
- Hack Tools Github
- Underground Hacker Sites
- Hack Tools Pc
- Hack Tools For Games
- Hack Tools Pc
- Pentest Tools Kali Linux
- Wifi Hacker Tools For Windows
- Kik Hack Tools
- Hacks And Tools
- Pentest Tools Port Scanner
- Android Hack Tools Github
- Hacking Tools Software
- Github Hacking Tools
- Hak5 Tools
- Pentest Box Tools Download
- Computer Hacker
- Hack Tools For Mac
- Pentest Recon Tools
- Hack Tools For Pc
- Pentest Tools Download
- Hack And Tools
- Hacker Tools Free
- What Is Hacking Tools
- Hacker Tools Linux
- Hacking Tools 2020
- Pentest Tools Website
- Hacking Tools Usb
- Hacking Tools And Software
- Hack Tools Github
- Pentest Tools Url Fuzzer
- Hack Tools For Ubuntu
- Hacker Tools Github
- Hacker Security Tools
- Hacker Tools Apk Download
- Pentest Tools Review
- Hack Tools Github
- Github Hacking Tools
- New Hacker Tools
- Hacking Tools For Games
- Pentest Tools Github
- Pentest Tools For Android
- Bluetooth Hacking Tools Kali
- Hacking Tools For Games
- Pentest Tools Review
- World No 1 Hacker Software
- Pentest Tools For Windows
- Hacking Tools Kit
- Hacking Tools 2019
- Hacking Tools Free Download
- Hacker Security Tools
- Hacker Techniques Tools And Incident Handling
- Hacker Security Tools
- Wifi Hacker Tools For Windows
- Hacker
- Pentest Tools Linux
- Hacker Security Tools
- Nsa Hacker Tools
- Hack Tools For Games
- Hack Rom Tools
- Hack Website Online Tool
- Growth Hacker Tools
- Hack Tools Github
- Hack Tools Download
- Ethical Hacker Tools
- Usb Pentest Tools
- Hacking App
- Hacker Tools Windows
- Hack Tools For Ubuntu
- Top Pentest Tools
- Nsa Hack Tools
- How To Make Hacking Tools
- Hacking Tools For Kali Linux
- Hacker Tools Github
- Hack And Tools
- Hacking Tools Usb
- World No 1 Hacker Software
- Pentest Tools Download
- Hacker Tools Online
- Hacker Search Tools
- Hack Rom Tools
- Pentest Tools Website Vulnerability
- Beginner Hacker Tools
- Pentest Recon Tools
- Hack Tools For Windows
- Pentest Tools Tcp Port Scanner
- Hacker Tools Apk Download
- Pentest Tools Apk
- Hacking Tools And Software
- Pentest Reporting Tools
- Hacking Tools Download
- Hacker Security Tools
No comments:
Post a Comment