This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [libstdc++ PATH] tr1::bind support



On Mar 23, 2005, at 6:58 AM, Steven Bosscher wrote:


On Tuesday 22 March 2005 11:27, Chris Jefferson wrote:
Steven Bosscher wrote:
Could you send me a preprocessed file for this?  I want to know
where all that time is going in a non-PCH compile (I have a few
ideas, but I'd like to check them...).

Heres a bzip2ed, preprocessed copy of testsuite/tr1/6_containers/tuple/comparison_operators/comparisons.cc. (for 4.1.0 20050315) Have fun ;)


Blech. Almost *all* compile time is sucked up in the C++ front end name look stuff (at any -On, here at -O0):

Execution times (seconds)
life analysis : 0.00 ( 0%) usr 0.00 ( 0%) sys 0.01 ( 0%) wall
preprocessing : 0.30 ( 4%) usr 0.20 (15%) sys 0.59 ( 7%) wall
parser : 1.61 (22%) usr 0.63 (46%) sys 2.41 (27%) wall
name lookup : 5.40 (73%) usr 0.50 (37%) sys 5.65 (64%) wall

Ouch! I wonder if all of the time spent in comptypes is due to quadratic behavior in finding & matching partial specializations, One "minor" difference between the libstdc++ and Boost implementations of bind and mem_fn is that libstdc++ uses a single class template (e.g., _Bind) with lots of partial specializations whereas Boost uses many more class templates with the number of parameters attached (bind0, bind1, bind2, ..., etc.). We could try going the Boost way to see if that improves compile time.


(I just noticed that Steven reduced compile time by 40%. Great work!).

Doug


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]