|
Boost Users : |
From: troy d. straszheim (troy_at_[hidden])
Date: 2005-10-30 12:48:31
On Sat, Oct 22, 2005 at 06:52:03PM -0400, Oliver Schoenborn wrote:
>
> Basically (as of boost 1.32), coutf is less than 10% slower than explicitely
> calling operator<< and manipulators, whereas boost.format is 70% slower. As
> with any benchmarking, it depends on how you use the stuff, I'm sure there
> are cases where the numbers are reversed, but the benchmarking I did is for
> what I perceive as "typical" use cases. See the web page.
>
I'm most interested in the compile-time performance. coutf is ~ 1/3
as many lines as format (as informally counted with wc -l) and it
clearly requires far fewer template instantiations. So it looks
good... reason for the curiosity is I once changed all the printfs
(which were used to format messages that were then forwarded to a
logger) in a fairly large project to boost::format and the compile
time for the project tripled (this was with an old gcc, boost 1.32).
-t
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net