Skip to content

Instantly share code, notes, and snippets.

@p4checo
Last active December 17, 2015 13:19
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 p4checo/5615812 to your computer and use it in GitHub Desktop.
Save p4checo/5615812 to your computer and use it in GitHub Desktop.
new readwriterqueue-bench example runs, with updated code
|----------- Min ------------|------------ Max ------------|------------ Avg ------------|
Benchmark | RWQ | SPSC | Folly | RWQ | SPSC | Folly | RWQ | SPSC | Folly | xSPSC | xFolly
------------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+-------+-------
Raw add | 0.0007s | 0.0004s | 0.0003s | 0.0007s | 0.0004s | 0.0003s | 0.0007s | 0.0004s | 0.0003s | 0.53x | 0.38x
Raw remove | 0.0003s | 0.0003s | 0.0004s | 0.0003s | 0.0003s | 0.0004s | 0.0003s | 0.0003s | 0.0004s | 1.25x | 1.78x
Raw empty remove | 0.0007s | 0.0006s | 0.0006s | 0.0013s | 0.0007s | 0.0006s | 0.0011s | 0.0007s | 0.0006s | 0.58x | 0.54x
Single-threaded | 0.0039s | 0.0037s | 0.0037s | 0.0039s | 0.0037s | 0.0037s | 0.0039s | 0.0037s | 0.0037s | 0.95x | 0.95x
Mostly add | 0.0073s | 0.0062s | 0.0064s | 0.0077s | 0.0066s | 0.0064s | 0.0075s | 0.0064s | 0.0064s | 0.85x | 0.85x
Mostly remove | 0.0064s | 0.0062s | 0.0062s | 0.0065s | 0.0063s | 0.0062s | 0.0064s | 0.0063s | 0.0062s | 0.97x | 0.97x
Heavy concurrent | 0.0028s | 0.0016s | 0.0013s | 0.0028s | 0.0017s | 0.0013s | 0.0028s | 0.0017s | 0.0013s | 0.59x | 0.47x
Random concurrent | 0.0388s | 0.0361s | 0.0116s | 0.0479s | 0.0387s | 0.0181s | 0.0431s | 0.0377s | 0.0146s | 0.87x | 0.34x
Average ops/s:
ReaderWriterQueue: 103.77 million
SPSC queue: 135.68 million
Folly queue: 200.47 million
|----------- Min ------------|------------ Max ------------|------------ Avg ------------|
Benchmark | RWQ | SPSC | Folly | RWQ | SPSC | Folly | RWQ | SPSC | Folly | xSPSC | xFolly
------------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+-------+-------
Raw add | 0.0007s | 0.0004s | 0.0003s | 0.0007s | 0.0004s | 0.0003s | 0.0007s | 0.0004s | 0.0003s | 0.54x | 0.38x
Raw remove | 0.0003s | 0.0003s | 0.0003s | 0.0003s | 0.0003s | 0.0003s | 0.0003s | 0.0003s | 0.0003s | 1.24x | 1.15x
Raw empty remove | 0.0009s | 0.0006s | 0.0006s | 0.0009s | 0.0007s | 0.0006s | 0.0009s | 0.0006s | 0.0006s | 0.74x | 0.70x
Single-threaded | 0.0039s | 0.0037s | 0.0037s | 0.0039s | 0.0037s | 0.0037s | 0.0039s | 0.0037s | 0.0037s | 0.95x | 0.95x
Mostly add | 0.0079s | 0.0060s | 0.0063s | 0.0079s | 0.0064s | 0.0065s | 0.0079s | 0.0062s | 0.0064s | 0.78x | 0.81x
Mostly remove | 0.0063s | 0.0062s | 0.0060s | 0.0065s | 0.0063s | 0.0062s | 0.0064s | 0.0062s | 0.0061s | 0.98x | 0.96x
Heavy concurrent | 0.0029s | 0.0016s | 0.0013s | 0.0029s | 0.0016s | 0.0013s | 0.0029s | 0.0016s | 0.0013s | 0.56x | 0.45x
Random concurrent | 0.0365s | 0.0355s | 0.0143s | 0.0388s | 0.0430s | 0.0181s | 0.0375s | 0.0405s | 0.0168s | 1.08x | 0.45x
Average ops/s:
ReaderWriterQueue: 133.80 million
SPSC queue: 120.25 million
Folly queue: 233.04 million
|----------- Min ------------|------------ Max ------------|------------ Avg ------------|
Benchmark | RWQ | SPSC | Folly | RWQ | SPSC | Folly | RWQ | SPSC | Folly | xSPSC | xFolly
------------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+-------+-------
Raw add | 0.0007s | 0.0004s | 0.0003s | 0.0007s | 0.0004s | 0.0003s | 0.0007s | 0.0004s | 0.0003s | 0.53x | 0.37x
Raw remove | 0.0003s | 0.0003s | 0.0003s | 0.0003s | 0.0003s | 0.0003s | 0.0003s | 0.0003s | 0.0003s | 1.23x | 1.15x
Raw empty remove | 0.0009s | 0.0005s | 0.0005s | 0.0009s | 0.0006s | 0.0006s | 0.0009s | 0.0006s | 0.0005s | 0.67x | 0.63x
Single-threaded | 0.0039s | 0.0037s | 0.0037s | 0.0039s | 0.0037s | 0.0037s | 0.0039s | 0.0037s | 0.0037s | 0.95x | 0.95x
Mostly add | 0.0072s | 0.0061s | 0.0063s | 0.0080s | 0.0066s | 0.0064s | 0.0076s | 0.0065s | 0.0064s | 0.84x | 0.83x
Mostly remove | 0.0063s | 0.0062s | 0.0061s | 0.0064s | 0.0062s | 0.0062s | 0.0064s | 0.0062s | 0.0062s | 0.98x | 0.97x
Heavy concurrent | 0.0028s | 0.0016s | 0.0013s | 0.0028s | 0.0016s | 0.0013s | 0.0028s | 0.0016s | 0.0013s | 0.56x | 0.46x
Random concurrent | 0.0352s | 0.0357s | 0.0109s | 0.0429s | 0.0403s | 0.0149s | 0.0413s | 0.0379s | 0.0132s | 0.92x | 0.32x
Average ops/s:
ReaderWriterQueue: 147.80 million
SPSC queue: 147.26 million
Folly queue: 235.93 million
|----------- Min ------------|------------ Max ------------|------------ Avg ------------|
Benchmark | RWQ | SPSC | Folly | RWQ | SPSC | Folly | RWQ | SPSC | Folly | xSPSC | xFolly
------------------+---------+---------+---------+---------+---------+---------+---------+---------+---------+-------+-------
Raw add | 0.0007s | 0.0004s | 0.0003s | 0.0007s | 0.0004s | 0.0003s | 0.0007s | 0.0004s | 0.0003s | 0.54x | 0.37x
Raw remove | 0.0003s | 0.0003s | 0.0003s | 0.0003s | 0.0003s | 0.0003s | 0.0003s | 0.0003s | 0.0003s | 1.23x | 1.14x
Raw empty remove | 0.0009s | 0.0005s | 0.0005s | 0.0009s | 0.0007s | 0.0006s | 0.0009s | 0.0006s | 0.0006s | 0.73x | 0.66x
Single-threaded | 0.0039s | 0.0037s | 0.0037s | 0.0039s | 0.0037s | 0.0037s | 0.0039s | 0.0037s | 0.0037s | 0.95x | 0.95x
Mostly add | 0.0070s | 0.0062s | 0.0064s | 0.0079s | 0.0065s | 0.0064s | 0.0074s | 0.0063s | 0.0064s | 0.85x | 0.86x
Mostly remove | 0.0062s | 0.0062s | 0.0060s | 0.0064s | 0.0062s | 0.0062s | 0.0063s | 0.0062s | 0.0061s | 0.98x | 0.97x
Heavy concurrent | 0.0028s | 0.0016s | 0.0013s | 0.0031s | 0.0016s | 0.0013s | 0.0030s | 0.0016s | 0.0013s | 0.54x | 0.43x
Random concurrent | 0.0375s | 0.0353s | 0.0181s | 0.0432s | 0.0376s | 0.0181s | 0.0400s | 0.0367s | 0.0181s | 0.92x | 0.45x
Average ops/s:
ReaderWriterQueue: 148.48 million
SPSC queue: 128.85 million
Folly queue: 219.42 million
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment