Boost logo

Boost :

From: Alexander Nasonov (alnsn_at_[hidden])
Date: 2006-07-06 14:56:52


Hi,
I'm preparing a patch to improve a performance of lexical_cast
for certain combinations of types.
For example, int to char transformation is 5.9 times faster on
my FreeBSD. It could be even faster if not a requirement to add
a thousands separator.

There are few issues I'd like to sort out before I finish the work.

1. Enums, unlike integral types, are not optimized. I don't want
   to break a conversion from enums with user-defined operator<<.
   My firm opinion on this is not to support this edge case and
   allow optimization.

2. To improve a performance even further, I'd like to add
   lexical_cast< boost::array<N,char> >(arg) but it would break
   InputStreamable requirement.

3. A couple of conversion functions are good candidates for .cpp file.
   I expect a strong resistance to this change. Don't get me wrong,
   I'm not going to change this in default build, I'm asking for new
   configuration parameter. Something like BOOST_LINK_CORELIB.
   A user should always link with -lboost_core if BOOST_LINK_CORELIB
   is defined.

That do you think?

-- 
Alexander Nasonov
Project Manager at Akmosoft ( http://www.akmosoft.com )
Blog: http://nasonov.blogspot.com
Email: $(FirstName) dot $(LastName) at gmail dot com







Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk