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)
- Tools For Hacker
- Hacker Tools
- Hacker Tools 2019
- Kik Hack Tools
- Pentest Tools List
- Hacker Tools For Pc
- Underground Hacker Sites
- Hacker Tools Windows
- Hack Tools For Games
- Nsa Hacker Tools
- Pentest Tools Online
- Usb Pentest Tools
- Pentest Tools For Android
- Hacker Search Tools
- Hacker Security Tools
- Pentest Tools For Windows
- Pentest Tools Subdomain
- Tools For Hacker
- Top Pentest Tools
- Termux Hacking Tools 2019
- Hack Tools Github
- Kik Hack Tools
- Underground Hacker Sites
- Pentest Tools Free
- Hacker Techniques Tools And Incident Handling
- Hacking Tools For Kali Linux
- Game Hacking
- Pentest Tools Alternative
- Ethical Hacker Tools
- Pentest Tools Kali Linux
- Hacker Tools Online
- Pentest Tools Alternative
- Hack And Tools
- Hack Tools Download
- Hacker Tool Kit
- Usb Pentest Tools
- Hacking Tools Kit
- Hack Tools Download
- Hacker Tools Linux
- Hacker Tools For Ios
- Free Pentest Tools For Windows
- Hack Tools Pc
- Hack Tools For Mac
- Easy Hack Tools
- Pentest Tools Find Subdomains
- Pentest Tools Open Source
- Hacking Tools Windows
- Hacking Tools For Games
- Pentest Tools For Mac
- Hacking Apps
- Kik Hack Tools
- Hacker Tools Free
- Hack Tool Apk No Root
- Hacker Tools For Mac
- Nsa Hack Tools Download
- Ethical Hacker Tools
- Hacking Tools For Windows
- Hacker Tools Apk
- Pentest Automation Tools
- Hack Tools 2019
- Hacker Tools 2020
- Hacking Tools 2019
- Blackhat Hacker Tools
- What Are Hacking Tools
- Hacking Tools Windows 10
- Beginner Hacker Tools
- Hack App
- Hack Tools Download
- Hacking Tools For Pc
- Hacker Tools Free
- Pentest Tools Port Scanner
- Hacks And Tools
- Pentest Tools For Ubuntu
- Tools Used For Hacking
- Hack Tool Apk No Root
- Hacking Tools For Windows
- Hack Tools
- Bluetooth Hacking Tools Kali
- Ethical Hacker Tools
- Hack Tools For Ubuntu
- Pentest Tools Download
- What Are Hacking Tools
- Hacker Security Tools
- Hacker Tools List
- Best Hacking Tools 2019
- How To Make Hacking Tools
- Pentest Tools Review
- Android Hack Tools Github
- Tools For Hacker
- Usb Pentest Tools
- Hacker Tools List
- Hack Tools 2019
- Hacking Tools Kit
- Pentest Tools Kali Linux
- Pentest Tools Subdomain
- Hack Tools Download
- Hacker Tools Free Download
- Underground Hacker Sites
- Hacker Tools Free Download
- Hacking Tools 2019
- Nsa Hacker Tools
- Pentest Tools Github
- Hack Tools
- Pentest Tools Online
- Hacker Tools Free Download
- Pentest Tools Linux
- Hacker Tools Windows
- Hack Tools For Ubuntu
- Hack Tools For Pc
- Hack Tools
- Hacker Tools Apk
- Usb Pentest Tools
- Hack Tools
- Hacker Techniques Tools And Incident Handling
- Hacker Tools Windows
- Hacks And Tools
- Hacker Tools Github
- Best Pentesting Tools 2018
- Termux Hacking Tools 2019
- Growth Hacker Tools
- Pentest Reporting Tools
- Hacking Tools Free Download
- Hacking Tools For Windows
- Best Pentesting Tools 2018
- Pentest Tools Github
- Hacker Tools Apk
- Hacking Tools Windows 10
- Pentest Tools Online
- New Hack Tools
- Pentest Tools List
- Hack Tools Github
- Hack Apps
- Hacking Tools Pc
- Pentest Tools For Mac
- Pentest Tools Linux
- Hacking Tools Free Download
- Physical Pentest Tools
- Github Hacking Tools
- Pentest Tools Nmap
- Black Hat Hacker Tools
- Hacker Tools Github
- Hacking Tools For Windows
- Computer Hacker
- Hack Rom Tools
- Hacking Tools Online
- Hacking Tools 2020
- Free Pentest Tools For Windows
- Nsa Hack Tools Download
- Beginner Hacker Tools
- Top Pentest Tools
- Hacking Tools Github
- Hacking Tools Github
- Hacking Tools For Beginners
- Hacker Tools 2020
- Computer Hacker
- Hack Tools Download
- Hacking Tools And Software
- Pentest Tools Github
- Blackhat Hacker Tools
- Hacking Tools Software
- Easy Hack Tools
- Pentest Tools Url Fuzzer
- Hacker Tool Kit
- Pentest Tools Github
- Hacking Tools Github
- Hacker Tools 2020
- Pentest Tools For Ubuntu
- Pentest Tools Review
Tiada ulasan:
Catat Ulasan