[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Poll: Who uses itoa() & co with base != {2, 8, 10, 16
From: |
Anton Erasmus |
Subject: |
Re: [avr-gcc-list] Poll: Who uses itoa() & co with base != {2, 8, 10, 16}? |
Date: |
Sat, 19 Nov 2005 08:40:40 +0200 |
On 18 Nov 2005 at 21:29, Joerg Wunsch wrote:
> Dmitry Xmelkov provided speed-improved versions of itoa() & Co. that
> no longer use standard division functions for formatting:
>
> https://savannah.nongnu.org/patch/?func=detailitem&item_id=3729
>
> The only drawback of that approach is that its use will restrict the
> posible base of these functions to either 2, 8, 10, or 16.
>
> I tend to see this as benign, as I cannot imagine why anyone would
> want to print out numbers base 7 or base 13, 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.
>
> While itoa() is not really standardized in any way (at least not for
> C, I'm not sure for C++), it is commonly implemented with a possible
> base of [2..36], so changing that would constitute an API change.
>
> 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. Default build uses the fast routines,
and if someone wants the full version, they can recompile with that option
selected.
Regards
Anton Erasmus--
A J Erasmus
- [avr-gcc-list] Poll: Who uses itoa() & co with base != {2, 8, 10, 16}?, Joerg Wunsch, 2005/11/18
- Re: [avr-gcc-list] Poll: Who uses itoa() & co with base != {2, 8, 10, 16}?, Christopher X. Candreva, 2005/11/18
- Re: [avr-gcc-list] Poll: Who uses itoa() & co with base != {2, 8, 10, 16}?, Alan Kilian, 2005/11/18
- Re: [avr-gcc-list] Poll: Who uses itoa() & co with base != {2, 8, 10, 16}?, Parthasaradhi Nayani, 2005/11/18
- Re: [avr-gcc-list] Poll: Who uses itoa() & co with base != {2, 8, 10, 16}?,
Anton Erasmus <=
- Re: [avr-gcc-list] Poll: Who uses itoa() & co with base != {2, 8, 10, 16}?, Joerg Wunsch, 2005/11/19
- Re: [avr-libc-dev] Re: [avr-gcc-list] Poll: Who uses itoa() & co with base != {2, 8, 10, 16}?, Russell Shaw, 2005/11/19
- Re: [avr-libc-dev] Re: [avr-gcc-list] Poll: Who uses itoa() & co with base != {2, 8, 10, 16}?, Daniel O'Connor, 2005/11/19
- Re: [avr-libc-dev] Re: [avr-gcc-list] Poll: Who uses itoa() & co with base != {2, 8, 10, 16}?, Russell Shaw, 2005/11/19
- Re: [avr-libc-dev] Re: [avr-gcc-list] Poll: Who uses itoa() & co with base != {2, 8, 10, 16}?, Daniel O'Connor, 2005/11/19
- Re: [avr-libc-dev] Re: [avr-gcc-list] Poll: Who uses itoa() & co with base != {2, 8, 10, 16}?, Russell Shaw, 2005/11/19
- Re: [avr-libc-dev] Re: [avr-gcc-list] Poll: Who uses itoa() & co with base != {2, 8, 10, 16}?, Joerg Wunsch, 2005/11/19
- Re: [avr-libc-dev] Re: [avr-gcc-list] Poll: Who uses itoa() & co with base != {2, 8, 10, 16}?, Rolf Ebert, 2005/11/19
- Re: [avr-libc-dev] Re: [avr-gcc-list] Poll: Who uses itoa() & co with base != {2, 8, 10, 16}?, Joerg Wunsch, 2005/11/19
- Re: [avr-libc-dev] Re: [avr-gcc-list] Poll: Who uses itoa() & cowith base != {2, 8, 10, 16}?, Jörgen Birkler, 2005/11/19
- Prev by Date:
Re: [avr-gcc-list] Poll: Who uses itoa() & co with base != {2, 8, 10, 16}?
- Next by Date:
Re: [avr-gcc-list] Poll: Who uses itoa() & co with base != {2, 8, 10, 16}?
- Previous by thread:
Re: [avr-gcc-list] Poll: Who uses itoa() & co with base != {2, 8, 10, 16}?
- Next by thread:
Re: [avr-gcc-list] Poll: Who uses itoa() & co with base != {2, 8, 10, 16}?
- Index(es):