Home — Leandro Pereira

<![endif] [if lt IE 7]> <p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p> <![endif] Leandro Pereira Home About 23 June 2014 Integer to string conversion There are various ways to convert integers to their string representation. These conversions are rarely a bottleneck, but they often show up while profiling certain applications. For instance, they’re very common in Lwan while building the response headers. To use Lwan as an example: initially, snprintf() was used to convert numbers. Although this works, it is quite boring, performance-wise. The second approach was using the naïve algorithm, which basically divides the number by ...

Linked on 2014-09-21 05:31:04 | Similar Links