Skip to content

Instantly share code, notes, and snippets.

@lukechilds

lukechilds/bench.md

Created Feb 27, 2020
Embed
What would you like to do?
Simple multithreaded shell benchmark

Simple multithreaded shell benchmark

# 1 thread
$ time bench()

real    0m46.143s
user    0m45.798s
sys     0m0.188s

# 4 threads in parralel
$ time (for i in {1..4}; do bench() & done; wait)

real    0m59.837s
user    3m50.724s
sys     0m1.351s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.