On Fri, Jul 29, 2011 at 12:44 AM, Chris Foster <[email protected]> wrote: > Correction: It appears I was quite wrong about this for the current source. > The above results are without optimizations turned on, which of course will > change the bloat calculation a lot due to inlining, which is the whole point > (duh!) Running the tinyformat test again with -O3 gives a massive 1.6Mb > executable, ouch!
With a careful placement of a single __attribute__((noinline)) and removing some other unnecessary inlines, here's an updated table for a -O3 build ====================== ================== ========================== test name total compile time executable size (stripped) ====================== ================== ========================== printf 1.6s 44K (32K) std::ostream 9.5s 80K (60K) tinyformat 33.6s 340K (308K) tinyformat, c++0x mode 36.2s 340K (308K) tinyformat, no inlines 21.0s 168K (144K) boost::format 101.1s 1.2M (1.1M) ====================== ================== ========================== We can further reduce the "tinyformat, no inlines" case to 88K by spamming noinlines everywhere on the template definitions, but I'm not sure it's worthwhile. The main question then is whether it's worth complicating the library implementation to allow for optional separate compilation which will give us that factor of two between 308K and 144K. I implemented it, but it's a little messy. Opinions? ~Chris. _______________________________________________ Oiio-dev mailing list [email protected] http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
