👨‍🏫 Tutorial How to measure gaana kabilis ang program mo (assembly pinaka malakas)(No installation needed)

I2Chan

Forum Expert
This is very important to see gaano ka low overhead, kabilis, efficient at good ang design ng code mo.

Screenshots
Codes functionality: To simply print Hello!

I used the lowest raw functionality for each programming language and compiled them with maximum optimization para fair.

Benchmark of Assembly (pinaka mamaw)
1748176865401.webp

This is not even optimized, it still somewhat leverages C.
1748176891636.webp

For C (mamaw talaga ang C haha)
1748175682447.webp

For Rust
1748175589198.webp

For Nim
1748175734232.webp

NodeJS took forever.

Assembly (lowest-level), C, Rust and Nim ay low-level. NodeJS is high-level same for Python. That's why mabilis sila.


Open Powershell and run the command.

Usage: 1..1000 | ForEach-Object { Measure-Command { exe/command } } | Measure-Object TotalMilliseconds -Average

Exe Example: 1..1000 | ForEach-Object { Measure-Command { .\index.exe } } | Measure-Object TotalMilliseconds -Average
Command Example: 1..1000 | ForEach-Object { Measure-Command { python index.py } } | Measure-Object TotalMilliseconds -Average
 

About this Thread

  • 3
    Replies
  • 574
    Views
  • 3
    Participants
Last reply from:
Xiene

Online now

Members online
808
Guests online
4,986
Total visitors
5,794

Forum statistics

Threads
2,327,672
Posts
29,236,695
Members
1,161,166
Latest member
drafpljl
Back
Top