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 news
- Hacking App
- Hacker Tools Hardware
- Pentest Tools For Ubuntu
- Hacking Tools Online
- Hacking Tools Kit
- Pentest Tools Subdomain
- Kik Hack Tools
- Hacking Tools For Windows 7
- Pentest Tools Free
- Hacking Tools For Windows
- Ethical Hacker Tools
- Hack Tools For Pc
- Computer Hacker
- New Hacker Tools
- Pentest Tools Free
- Pentest Recon Tools
- Pentest Tools Nmap
- New Hacker Tools
- Hacking Tools For Windows 7
- Pentest Tools Website Vulnerability
- Hacker Tools Apk Download
- Tools Used For Hacking
- Pentest Tools Nmap
- Beginner Hacker Tools
- Hacking Tools Windows 10
- Hacking Tools Download
- Hacking Tools Download
- Hackers Toolbox
- Easy Hack Tools
- Pentest Tools Tcp Port Scanner
- Hacker Tools Hardware
- Hacker Tools Apk
- Pentest Tools Port Scanner
- Pentest Tools For Mac
- Nsa Hack Tools
- Hackrf Tools
- Pentest Tools Review
- Hacker Tools Mac
- Kik Hack Tools
- Pentest Tools Tcp Port Scanner
- Hacking Tools Software
- Pentest Tools Bluekeep
- Hack Tools For Windows
- Game Hacking
- Black Hat Hacker Tools
- Hack Tools Download
- Beginner Hacker Tools
- Hacking App
- Hacks And Tools
- Hacker Techniques Tools And Incident Handling
- Hack Tool Apk No Root
- Hacker Tools For Windows
- Growth Hacker Tools
- Hacking Tools For Windows
- Hacker Hardware Tools
- Hacking Tools Hardware
- Tools Used For Hacking
- Blackhat Hacker Tools
- Hacking Tools For Kali Linux
- Github Hacking Tools
- Hacking Tools Software
- Hack Tools
- Hacking Tools Windows
- Install Pentest Tools Ubuntu
- Hack Apps
- Install Pentest Tools Ubuntu
- Underground Hacker Sites
- Hacks And Tools
- Pentest Tools Android
- Blackhat Hacker Tools
- Hacking Tools
- Pentest Reporting Tools
- Hacking Tools For Mac
- Hacking Tools 2019
- Pentest Tools Tcp Port Scanner
- Hacks And Tools
- What Are Hacking Tools
- Pentest Tools List
- How To Make Hacking Tools
- Hackrf Tools
- Pentest Tools Bluekeep
- Hacking Tools Name
- Hack Tools
- Hacker Tools Software
- Hack Tools Online
- Hacking Tools For Windows 7
- Hack Tools
- Physical Pentest Tools
- Hacker Security Tools
- Hack Tools 2019
- Tools 4 Hack
- What Is Hacking Tools
- How To Make Hacking Tools
- Hacker Tools For Pc
- Pentest Tools Bluekeep
- Pentest Tools Framework
- What Are Hacking Tools
- Hacking Tools Free Download
- Hack Tools For Ubuntu
- What Are Hacking Tools
- Ethical Hacker Tools
- Nsa Hack Tools Download
- Hack Tools For Mac
- Hacker Tools List
- Hacker Tools 2019
- Pentest Tools For Android
- Hacking Tools For Games
- Hack Tools 2019
- Hacking Tools For Pc
- Usb Pentest Tools
- Hacker Tool Kit
- Hacking Tools For Windows
- Hacks And Tools
- Hacker Tools For Ios
- Hackrf Tools
- Pentest Tools Online
- Hacking Tools Mac
- Tools 4 Hack
- Hack Tools Mac
- Hack Tools
- Hacker Tools Online
- Hacking Tools Kit
- Hack Tools Download
- Pentest Tools Website Vulnerability
- Hacker Tools Hardware
- Pentest Tools Website
- Pentest Tools Website Vulnerability
- Pentest Tools Find Subdomains
- Hacker Tools For Windows
- Hacker Tools 2019
- Pentest Tools Alternative
- Hack App
- Nsa Hack Tools
- New Hacker Tools
- Nsa Hacker Tools
- Hacking Tools For Kali Linux
- Hacking App
- Termux Hacking Tools 2019
- Hacking Tools Software
- Pentest Tools Windows
- Hacker Tools 2019
- Pentest Tools
- Hacking Tools Windows 10
- Kik Hack Tools
- Hacker Tools Apk
- Pentest Recon Tools
- Computer Hacker
- Pentest Tools Apk
- Pentest Tools List
- Hack Tools For Windows
- Hacker Tools Apk
- Hacking Tools For Windows
- Hack Tools
- Hacker Security Tools
- Hacker
- Hacking Tools 2020
- Hacking Tools Kit
- Hack Tools For Ubuntu
- Hacker Tools Apk Download
- Termux Hacking Tools 2019
- Hacking Tools Free Download
- Hacker Hardware Tools
- Wifi Hacker Tools For Windows
- Hack Tools Download
- Pentest Tools List
- Hacking Apps
No comments:
Post a Comment