[master] a289b6191 add phk's suggestion to the micro-benchmark
Poul-Henning Kamp
phk at phk.freebsd.dk
Mon Oct 8 08:50:19 UTC 2018
--------
In message <20181008083009.DE8FB6469A at lists.varnish-cache.org>, Nils Goroll wri
tes:
> add phk's suggestion to the micro-benchmark
That's a decent speedup on my laptop:
real: 0.002875s / 100000 = 28.746128ns - tst val 153898795965262.718750
mono: 0.002804s / 100000 = 28.038025ns - tst val 23255208087.509720
printf %.6f: 0.030551s / 100000 = 305.507500ns - tst val 5300000.000000 232552.082280
printf %ju.%06ju: 0.022367s / 100000 = 223.666760ns - tst val 5300000.000000 232552.112834
Not so much on the VM which runs varnish-cache.org:
real: 0.232683s / 100000 = 2326.831818ns - tst val 153898853429232.062500
mono: 0.224068s / 100000 = 2240.684032ns - tst val 702986774.319679
printf %.6f: 0.036718s / 100000 = 367.176090ns - tst val 4600000.000000 7029.980350
printf %ju.%06ju: 0.035709s / 100000 = 357.088150ns - tst val 4600000.000000 703
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
More information about the varnish-commit
mailing list