Boost logo

Boost :

Subject: Re: [boost] lexical_cast optimization
From: Alexander Nasonov (alnsn_at_[hidden])
Date: 2008-12-04 05:27:02

David Abrahams <dave <at>> writes:

> Someone was asking me today about the inefficiency of lexical_cast for
> its common itoa/atoi-like usage, and it occurred to me that it could
> *easily* be optimized to handle the common cases by dispatching to
> itoa/atoi ftoa/atof where available, and even sprintf. Seems like a
> great idea to me.

This can be easily done only if a program always uses the classic C and C++
locales. Optimization for some combinations of types is already available if

Mapping between C and C++ locales is hard, if possible at all in a portable way.


Boost list run by bdawes at, gregod at, cpdaniel at, john at