Boost logo

Boost :

From: Michael Goldshteyn (mgoldshteyn_at_[hidden])
Date: 2006-02-01 18:21:33


"Thorsten Ottosen" <tottosen_at_[hidden]> wrote in message
news:drraqn$pok$1_at_sea.gmane.org...
> have you tried to benchmark fixed_string compared to std::string with
> the short string optimization?
>
> is fixed_string really faster?
>
> -Thorsten

Thorsten, the biggest problem I have found with libraries that offer this
optimization, and I am glad that VC++ 7.1's is one of them, is that the
definition of "short" is non-configurable, except by changing a very
important header file. Even if a change to that header file is made, there
is no guarantee that the compiler actually reads the header file and does
not have its contents hardcoded when an include directive for that header
file is seen in source code, since the header file is a "standard" (i.e.
included with the compiler) header file.

For example, in VC++, IIRC, it is set to somewhere in the neighborhood of
15. I would much rather that they upped this value to 31 or 63, or somewhere
thereabouts.

Michael Goldshteyn


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