KnightSch / python-on-a-chip

Automatically exported from code.google.com/p/python-on-a-chip
Other
0 stars 1 forks source link

Reduce calls to snprint() using home-brew itoa/ftoa/dtoa #228

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
P14p claims no library dependencies, but the implementation of some features 
has utilized the snprintf API from clib which can be costly in terms of code 
size.  Eliminating all calls to snprintf is not feasible at the moment, but 
there are a few calls where the snprintf is only doing integer-to-string and 
float-to-string conversions.  These instances could be replaced with a call to 
a homebrew implementation of itoa and ftoa (or dtoa).  The APIs itoa and 
ftoa/dtoa would belong in src/vm/sli.c because they resemble a Standard Library 
Interface.

One good google hit I found on itoa was:
http://www.jb.man.ac.uk/~slowe/cpp/itoa.html

Original issue reported on code.google.com by dwhall...@gmail.com on 20 Feb 2012 at 3:24

GoogleCodeExporter commented 8 years ago
Duplicate of issue 212

Original comment by dwhall...@gmail.com on 20 Feb 2012 at 5:22