mini benchmark vtim formatting

Dridi Boukelmoune dridi at varni.sh
Mon Oct 8 11:51:38 UTC 2018


> So now the question is how this looks for other platforms. @All, Please send
> your results!

$ ./double
real: 0.004972s / 100000 = 49.715042ns - tst val 153899435413393.562500
mono: 0.003554s / 100000 = 35.541058ns - tst val 1075376231.264834
printf %.6f: 0.059387s / 100000 = 593.865160ns - tst val
5100000.000000 10753.764099
printf %ju.%06ju: 0.010162s / 100000 = 101.621330ns - tst val
5100000.000000 10753.823494

$ ./uint_nsec
1 vt is 1 nsec
real: 5054881ns / 100000 = 50ns - tst val 16651824334676002549
mono: 2728750ns / 100000 = 27ns - tst val 1030850150182733345
%lu.%06lu: 11545090ns / 100000 = 115ns - tst val 5600000        10308.502862
%lu.%06lu diff: 10600594ns / 100000 = 106ns - tst val 5600000   10308.514411
%06lu: 7568966ns / 100000 = 75ns - tst val 5600000      10308525016
2printf: 15149373ns / 100000 = 151ns - tst val 5600000  10308.532590

$ ./uint_usec8
1 vt is 125 nsec
real: 5313625ns / 100000 = 53ns - tst val 13710030185021002820
mono: 3063625ns / 100000 = 30ns - tst val 8258753524632712
%lu.%06lu: 12164125ns / 100000 = 121ns - tst val 5100000        10323.443427
%lu.%06lu diff: 10665000ns / 100000 = 106ns - tst val 5100000   10323.455602
%06lu: 7729250ns / 100000 = 77ns - tst val 5100000      10323466276
2printf: 15788875ns / 100000 = 157ns - tst val 5100000  10323.474012

$ uname -a
Linux dridi 4.18.11-200.fc28.x86_64 #1 SMP Sun Sep 30 15:31:40 UTC
2018 x86_64 x86_64 x86_64 GNU/Linux

Dridi


More information about the varnish-dev mailing list