This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Q about ctype.narrow
Paolo Carlini wrote:
Wouldn't that be also quite useful in order to speed up many
applications of
widen and narrow?
Of course, I see clearly that in this case we don't save to virtual function
call cost, we save only the wctob/btowc cost. In the case of the array
version,
the former would be typically amortized over many chars, though.
Overall, taking into account the *extreme* semplicity of this baseline
caching
mechanism, it should probably be applied systematically if the sophisticated
solutions which are being discusses are not available.
Jerry (Pétur?) just let us know your timings for the general caching
solution,
ok? And don't forget that we are also interested in speeding up
ctype::do_is:
Pétur filed a neat PR about it.
Paolo.