atemerev / skynet

Skynet 1M threads microbenchmark
MIT License
1.04k stars 122 forks source link

Faster dotnetcore, add parallel, better timing #40

Closed benaadams closed 8 years ago

benaadams commented 8 years ago

Added Parallel, Single threaded Async; multithreaded Async and ValueTask Async

If you use the Release config

dotnet run --configuration Release

or compile it in release mode...

dotnet compile --configuration Release -o bin
bin\dnx

The results are (Win10 on iMac Intel i5 @ 2.9GHz)

Arch 64 bit - Cores 4
499999500000
1 Thread - Sync: 5.756ms
499999500000
1 Thread - Async: 146.579ms
499999500000
1 Thread - ValueTask Async: 16.917ms
499999500000
Parallel Async: 86.191ms
499999500000
Parallel - ValueTask Async: 4.988ms
499999500000
Parallel Sync: 1.661ms

Debug mode matches the current results

Arch 64 bit - Cores 4
499999500000
1 Thread - Sync: 42.653ms
499999500000
1 Thread - Async: 186.333ms
499999500000
1 Thread - ValueTask Async: 64.792ms
499999500000
Parallel Async: 84.977ms
499999500000
Parallel - ValueTask Async: 19.903ms
499999500000
Parallel Sync: 13.490ms
Jetski5822 commented 8 years ago

whoah, didn't realize what ValueTask Async gave us! +1