[m-rev.] for post-commit review: speed up string.format for integers

Julien Fischer jfischer at opturion.com
Wed Nov 12 19:22:06 AEDT 2014


Hi,

On Wed, Nov 12, 2014 at 6:26 PM, Zoltan Somogyi <zoltan.somogyi at runbox.com>
wrote:

> This diff takes the time to do 5 million string.formats
> on my laptop from
>
> 27.950u 0.015s 0:27.98 99.9%    0+0k 0+0io 0pf+0w
> 27.266u 0.011s 0:27.29 99.9%    0+0k 0+8io 0pf+0w
>
> to
>
> 18.191u 0.007s 0:18.21 99.8%    0+0k 0+0io 0pf+0w
> 17.988u 0.004s 0:18.00 99.8%    0+0k 0+0io 0pf+0w
>
> I expect that the time taken to create the 5 million
> random numbers is a significant fraction of the 18 seconds,
> so the speedup is better than one-third.


Was defining ML_USE_SPRINTF to be MR_FALSE intentional at this stage?

Cheers,
Julien.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20141112/b98d3da9/attachment.html>


More information about the reviews mailing list