Skip to content

Instantly share code, notes, and snippets.

@qtxie
Last active December 18, 2015 19:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save qtxie/5835643 to your computer and use it in GitHub Desktop.
Save qtxie/5835643 to your computer and use it in GitHub Desktop.
1. C Benchmark
program: https://gist.github.com/qtxie/5835613
- No optimizition
compiling: cl random.c
run in windows powershell:
PS > Measure-Command {Start-Process .\random.exe -Wait}
Days : 0
Hours : 0
Minutes : 0
Seconds : 3
Milliseconds : 9
Ticks : 30096804
TotalDays : 3.48342638888889E-05
TotalHours : 0.000836022333333333
TotalMinutes : 0.05016134
TotalSeconds : 3.0096804
TotalMilliseconds : 3009.6804
- Optimize with O2
compiling: cl /O2 random.c
run in windows powershell:
PS > Measure-Command {Start-Process .\random.exe -Wait}
Days : 0
Hours : 0
Minutes : 0
Seconds : 2
Milliseconds : 5
Ticks : 20050151
TotalDays : 2.3206193287037E-05
TotalHours : 0.000556948638888889
TotalMinutes : 0.0334169183333333
TotalSeconds : 2.0050151
TotalMilliseconds : 2005.0151
2. Red/System Benchmark
program: https://gist.github.com/qtxie/5831308
compiling: do/args %rsc.r "%tests/random.reds"
run in windows powershell:
PS > Measure-Command {Start-Process .\random.exe -Wait}
Days : 0
Hours : 0
Minutes : 0
Seconds : 4
Milliseconds : 7
Ticks : 40076724
TotalDays : 4.63850972222222E-05
TotalHours : 0.00111324233333333
TotalMinutes : 0.06679454
TotalSeconds : 4.0076724
TotalMilliseconds : 4007.6724
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment