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)
Read more
- Hacking Tools Online
- Pentest Tools Apk
- Hack Rom Tools
- Pentest Reporting Tools
- Tools 4 Hack
- Nsa Hack Tools Download
- Hacking Tools Online
- Nsa Hack Tools
- Pentest Tools Alternative
- Hacking Tools Download
- Hack Tools For Pc
- Hacker Tools
- Pentest Tools Bluekeep
- Termux Hacking Tools 2019
- Pentest Tools Android
- Pentest Automation Tools
- Hacking Tools For Windows
- Tools Used For Hacking
- Hacker Tools For Pc
- Nsa Hack Tools Download
- Pentest Box Tools Download
- Hack App
- Hacking Apps
- Pentest Tools Open Source
- Hacking Tools Windows
- Nsa Hack Tools Download
- Hack Tools For Ubuntu
- Hack Tools 2019
- Hack Website Online Tool
- Underground Hacker Sites
- How To Make Hacking Tools
- Android Hack Tools Github
- Hacking Tools Hardware
- Hack Tools Mac
- Hacker Tools For Windows
- Pentest Tools Review
- Hacking Tools Github
- Hack Tools Online
- Hacker Tools Free
- Hacks And Tools
- New Hack Tools
- Pentest Tools Apk
- Pentest Tools Framework
- Pentest Tools Find Subdomains
- New Hacker Tools
- Free Pentest Tools For Windows
- Hacking Tools Name
- Tools Used For Hacking
- Pentest Tools Android
- Hack Tools Pc
- Hacking App
- Hack And Tools
- Computer Hacker
- Pentest Box Tools Download
- Tools Used For Hacking
- Github Hacking Tools
- Hacker
- Hacker Tools Windows
- Hacker Techniques Tools And Incident Handling
- Hackers Toolbox
- Pentest Recon Tools
- Hack Tools For Windows
- Tools 4 Hack
- Pentest Tools
- Pentest Box Tools Download
- Pentest Tools Subdomain
- Hacking Tools For Windows 7
- Hacking Tools Mac
- Pentest Automation Tools
- Hack App
- Growth Hacker Tools
- Nsa Hack Tools
- Hacker Tools For Mac
- Hack Tools 2019
- Install Pentest Tools Ubuntu
- Hacker Tools For Mac
- Hacker Hardware Tools
- Pentest Tools Windows
- Hacker Tools Github
- Hacking Tools Name
- Hacker Tools 2019
- Pentest Tools Port Scanner
- Install Pentest Tools Ubuntu
- Hacker Tool Kit
- Hacking Tools Name
- Pentest Tools List
- Top Pentest Tools
- What Are Hacking Tools
- Hacking Tools
- Hacker Tools 2020
- Pentest Tools Open Source
- Hack Tools For Mac
- Hack Tools Github
- Hack Tool Apk
- Pentest Tools Github
- Install Pentest Tools Ubuntu
- Install Pentest Tools Ubuntu
- Hacking Tools Download
- Pentest Tools Tcp Port Scanner
- Hacker Tools Windows
- Hack Tools For Pc
- Computer Hacker
- Hacker Tools 2020
- Hackrf Tools
- Hack Tools 2019
- Pentest Tools Download
- Usb Pentest Tools
- Github Hacking Tools
- Hack Tool Apk No Root
- Hacking Tools 2019
- Hacking Tools For Pc
- Hack Tools For Windows
- Usb Pentest Tools
- Hacker Search Tools
- Hacker Tools Hardware
- Hacking Tools For Windows
- Pentest Tools Free
- Black Hat Hacker Tools
- Wifi Hacker Tools For Windows
- How To Make Hacking Tools
- Pentest Tools Open Source
- Pentest Tools Framework
- Hacking Tools Pc
- Hacker Tools List
- Hacking Tools Free Download
- Hacker Tools For Pc
- Pentest Tools Kali Linux
- Hacking Tools Download
- Hacker Tools Github
- Nsa Hack Tools Download
- Pentest Tools Windows
- Hacker Tools 2019
- Hacks And Tools
- Hacker Tools Linux
- Bluetooth Hacking Tools Kali
- Pentest Reporting Tools
- Hack Tools For Games
- Hacking Tools
- Best Pentesting Tools 2018
- Hacking Tools For Beginners
- Free Pentest Tools For Windows
- Hacker Hardware Tools
- Pentest Box Tools Download
- Hak5 Tools
- Hacking Tools Online
- How To Hack
- Pentest Tools Kali Linux
- Hack And Tools
- Hack Tools Github
- Hacking Tools 2019
- Hacker Tools For Mac
- Pentest Tools Nmap
- Pentest Tools For Windows
- Tools Used For Hacking
- Hacking Tools Hardware
- Hacker Tools Mac
- Pentest Tools Github
- Hak5 Tools
- Hack Tool Apk No Root
- Beginner Hacker Tools
- Pentest Tools Website Vulnerability
- Pentest Tools For Mac
- Pentest Tools Open Source
- Growth Hacker Tools
- Hacking Tools Online
- Hacking Tools Windows 10
- Hacker Tools Mac
- Pentest Tools Windows
- Hacking Tools And Software
- Pentest Tools Alternative
Geen opmerkings nie:
Plaas 'n opmerking