Most performant way of converting int to string

Ali Çehreli via Digitalmars-d-learn digitalmars-d-learn at
Tue Dec 22 14:36:16 PST 2015

On 12/22/2015 10:15 AM, Andrew Chapman wrote:
 > On Tuesday, 22 December 2015 at 18:11:24 UTC, rumbu wrote:

 >> Converting numbers to string involves the most expensive known two
 >> operations : division and modulus by 10.
 > Cool thanks, so essentially it's unavoidable

There is hope. :)

 > I have a background in PHP programming where we don't really get 
exposed to
 > memory allocation, conversions etc.

You will love Andrei's recently-released presentations from code::dive 
in November 2015:

   Writing Fast Code I:

   Writing Fast Code II:

   Three Cool Things about D:

The first one has an example of optimizing uint64ToAscii() at around 


More information about the Digitalmars-d-learn mailing list