avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-libc-dev] Re: [avr-gcc-list] Poll: Who uses itoa() & co with ba


From: Russell Shaw
Subject: Re: [avr-libc-dev] Re: [avr-gcc-list] Poll: Who uses itoa() & co with base != {2, 8, 10, 16}?
Date: Sat, 19 Nov 2005 19:50:33 +1100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.11) Gecko/20050914 Debian/1.7.11-1

Joerg Wunsch wrote:
As Anton Erasmus wrote:

..., so I'm inclined to replace the existing itoa() family by
Dmitry's submission.  When doing so, I'll probably rename the
existing implementations to itoa_full() etc. to preserve them in
case anyone really needs that functionality.

Opinions?

I think it would be a good move. In most C libraries the itoa
function is extremely slow because it caters for all bases from 2 to
36. I think having a library compile option that compiles the full
version in stead of the faster version would be better than renaming
it.

I'd rather use something like

#define _USE_FULL_ITOA
#include <stdlib.h>

... itoa(x, s, 13);

That won't save any library space tho. If the reduced version is faster
and saves a lot of space, then it could be worthwhile having a compile-time
option.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]