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

Online now

Members online
1,166
Guests online
4,352
Total visitors
5,518

Forum statistics

Threads
2,313,190
Posts
29,172,247
Members
1,184,629
Latest member
Takue
Back
Top