👨‍🏫 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
  • 607
    Views
  • 3
    Participants
Last reply from:
Xiene

Online now

Members online
1,132
Guests online
15,090
Total visitors
16,222

Forum statistics

Threads
2,362,034
Posts
29,413,950
Members
1,056,759
Latest member
den1wen
Back
Top