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


Steven Bosscher <stevenb@suse.de> writes:

| 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
|  tree gimplify         :   0.03 ( 0%) usr   0.01 ( 1%) sys   0.03 ( 0%) wall
|  tree CFG construction :   0.01 ( 0%) usr   0.00 ( 0%) sys   0.00 ( 0%) wall
|  expand                :   0.00 ( 0%) usr   0.00 ( 0%) sys   0.01 ( 0%) wall
|  varconst              :   0.00 ( 0%) usr   0.01 ( 1%) sys   0.01 ( 0%) wall
|  local alloc           :   0.01 ( 0%) usr   0.00 ( 0%) sys   0.00 ( 0%) wall
|  global alloc          :   0.03 ( 0%) usr   0.00 ( 0%) sys   0.01 ( 0%) wall
|  final                 :   0.00 ( 0%) usr   0.00 ( 0%) sys   0.01 ( 0%) wall
|  rest of compilation   :   0.00 ( 0%) usr   0.00 ( 0%) sys   0.01 ( 0%) wall
|  TOTAL                 :   7.40             1.36             8.78

Ouch.  I would not have expected that.  It is good to have numbers.

| On a bootstrapped cc1plus of today, oprofile tells me that comptypes
| takes a rediculous amount of time, as does strlen.  Is this a known
| bottleneck in the C++ front end?


It is something we anticipated and described in a draft paper
   "Representing C++ directly, completely and effeciently"
that circulated at the last C++ meeting.  
I also believe that Nathan Sidwell recently alluded to that problem
(probably not so explicilty) in the list of issues with cc1plus in the
GCC Wiki. 

| Gr.
| Steven
| 
| 
| 
| CPU: Hammer, speed 1394.98 MHz (estimated)
| Counted CPU_CLK_UNHALTED events (Cycles outside of halt state) with a unit mask of 0x00 (No unit mask) count 4000
| Counted DATA_CACHE_MISSES events (Data cache misses) with a unit mask of 0x00 (No unit mask) count 1000
| samples  %        samples  %        image name               symbol name
| 216385   27.7772  12204    45.7164  cc1plus                  comptypes
| 132546   17.0148  2128      7.9715  libc.so.6                __GI_strlen
| 47665     6.1187  178       0.6668  cc1plus                  lookup_attribute
| 29624     3.8028  2639      9.8857  cc1plus                  ix86_comp_type_attributes
| 22547     2.8943  44        0.1648  cc1plus                  ix86_function_regparm
| 16875     2.1662  713       2.6709  cc1plus                  comp_template_args
| 16738     2.1486  1618      6.0611  cc1plus                  template_args_equal
| 11932     1.5317  643       2.4087  libc.so.6                __GI_memcpy
| 9724      1.2483  110       0.4121  cc1plus                  grokdeclarator
| 9019      1.1578  283       1.0601  cc1plus                  ggc_alloc_stat
| 7162      0.9194  54        0.2023  cc1plus                  anonymous symbol from section .plt
| 6206      0.7967  317       1.1875  libc.so.6                __GI_memset
| 5843      0.7501  39        0.1461  cc1plus                  _cpp_lex_direct
| 5791      0.7434  107       0.4008  cc1plus                  retrieve_specialization
| 5145      0.6605  115       0.4308  cc1plus                  cp_parser_nested_name_specifier_opt
| 4724      0.6064  226       0.8466  cc1plus                  lookup_field_1
| 4691      0.6022  26        0.0974  cc1plus                  pp_base_string
| 4390      0.5635  176       0.6593  cc1plus                  lookup_name_real
| 4078      0.5235  117       0.4383  cc1plus                  outer_binding
| 3809      0.4890  10        0.0375  cc1plus                  pp_base_append_text
| 3293      0.4227  47        0.1761  cc1plus                  ht_lookup_with_hash
| 3141      0.4032  34        0.1274  cc1plus                  cp_parser_simple_type_specifier
| 3124      0.4010  10        0.0375  cc1plus                  ht_lookup
| 3118      0.4003  71        0.2660  cc1plus                  cp_parser_lookup_name
| 3066      0.3936  20        0.0749  cc1plus                  pp_c_identifier
| 2996      0.3846  140       0.5244  cc1plus                  cp_lexer_consume_token
| 2827      0.3629  31        0.1161  cc1plus                  cp_parser_class_name
| 2728      0.3502  27        0.1011  cc1plus                  cp_parser_parse_definitely
| 2680      0.3440  43        0.1611  cc1plus                  lookup_member
| 2662      0.3417  147       0.5507  cc1plus                  make_node_stat
| 2651      0.3403  98        0.3671  cc1plus                  finish_id_expression
| 2549      0.3272  60        0.2248  cc1plus                  cp_parser_template_id
| 2532      0.3250  118       0.4420  cc1plus                  coerce_template_parms
| 

-- 
                                                       Gabriel Dos Reis 
                                           gdr@integrable-solutions.net


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