<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">macos:<br><br><div><div>real: 0.004912s / 100000 = 49.118996ns - tst val 153898934846862.750000</div><div>mono: 0.009153s / 100000 = 91.528893ns - tst val 41563718859.713966</div><div>printf %.6f: 0.025697s / 100000 = 256.970000ns - tst val 5100000.000000 415637.193185</div><div>printf %ju.%06ju: 0.017690s / 100000 = 176.900000ns - tst val 5100000.000000 415637.218924</div></div><div><br></div><div>inside docker:</div><div><br></div><div><div>real: 0.832294s / 100000 = 8322.939873ns - tst val 153898925522214.531250</div><div>mono: 0.829368s / 100000 = 8293.678761ns - tst val 13489198485.484814</div><div>printf %.6f: 0.076031s / 100000 = 760.311000ns - tst val 5700000.000000 134892.398735</div><div>printf %ju.%06ju: 0.019017s / 100000 = 190.173000ns - tst val 5700000.000000 134892.474827</div></div><div><br></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Oct 8, 2018 at 9:50 AM Poul-Henning Kamp <<a href="mailto:phk@phk.freebsd.dk" target="_blank">phk@phk.freebsd.dk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">--------<br>
In message <<a href="mailto:20181008083009.DE8FB6469A@lists.varnish-cache.org" target="_blank">20181008083009.DE8FB6469A@lists.varnish-cache.org</a>>, Nils Goroll wri<br>
tes:<br>
<br>
>    add phk's suggestion to the micro-benchmark<br>
<br>
That's a decent speedup on my laptop:<br>
<br>
        real: 0.002875s / 100000 = 28.746128ns - tst val 153898795965262.718750<br>
        mono: 0.002804s / 100000 = 28.038025ns - tst val 23255208087.509720<br>
        printf %.6f: 0.030551s / 100000 = 305.507500ns - tst val 5300000.000000 232552.082280<br>
        printf %ju.%06ju: 0.022367s / 100000 = 223.666760ns - tst val 5300000.000000 232552.112834<br>
<br>
Not so much on the VM which runs <a href="http://varnish-cache.org" rel="noreferrer" target="_blank">varnish-cache.org</a>:<br>
<br>
        real: 0.232683s / 100000 = 2326.831818ns - tst val 153898853429232.062500<br>
        mono: 0.224068s / 100000 = 2240.684032ns - tst val 702986774.319679<br>
        printf %.6f: 0.036718s / 100000 = 367.176090ns - tst val 4600000.000000 7029.980350<br>
        printf %ju.%06ju: 0.035709s / 100000 = 357.088150ns - tst val 4600000.000000 703<br>
<br>
<br>
-- <br>
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20<br>
phk@FreeBSD.ORG         | TCP/IP since RFC 956<br>
FreeBSD committer       | BSD since 4.3-tahoe    <br>
Never attribute to malice what can adequately be explained by incompetence.<br>
_______________________________________________<br>
varnish-commit mailing list<br>
<a href="mailto:varnish-commit@varnish-cache.org" target="_blank">varnish-commit@varnish-cache.org</a><br>
<a href="https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit" rel="noreferrer" target="_blank">https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit</a><br>
</blockquote></div>