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

Zoltan Somogyi zoltan.somogyi at runbox.com
Wed Nov 12 18:26:34 AEDT 2014


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.

Zoltan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Log.str_int
Type: application/octet-stream
Size: 452 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20141112/97c1c4ee/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DIFF.str_int
Type: application/octet-stream
Size: 10887 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20141112/97c1c4ee/attachment-0001.obj>


More information about the reviews mailing list