* [Bug c++/22635] OVERLOAD should not be a linked list of trees
2005-07-23 20:32 [Bug c++/22635] New: OVERLOAD should not be a linked list of trees pinskia at gcc dot gnu dot org
@ 2005-07-23 22:14 ` pinskia at gcc dot gnu dot org
2005-07-23 22:33 ` pinskia at gcc dot gnu dot org
` (8 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-23 22:14 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
OtherBugsDependingO| |12850
nThis| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22635
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/22635] OVERLOAD should not be a linked list of trees
2005-07-23 20:32 [Bug c++/22635] New: OVERLOAD should not be a linked list of trees pinskia at gcc dot gnu dot org
2005-07-23 22:14 ` [Bug c++/22635] " pinskia at gcc dot gnu dot org
@ 2005-07-23 22:33 ` pinskia at gcc dot gnu dot org
2005-07-23 22:42 ` pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-23 22:33 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-07-23 22:32 -------
I added some stats to when chaining to the ovl and got the following interesting result for PR 12850:
average OVL length: 57.498998
So we have an average length of 57 which is long and shows that we are taking too much memory
because of this.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22635
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/22635] OVERLOAD should not be a linked list of trees
2005-07-23 20:32 [Bug c++/22635] New: OVERLOAD should not be a linked list of trees pinskia at gcc dot gnu dot org
2005-07-23 22:14 ` [Bug c++/22635] " pinskia at gcc dot gnu dot org
2005-07-23 22:33 ` pinskia at gcc dot gnu dot org
@ 2005-07-23 22:42 ` pinskia at gcc dot gnu dot org
2005-07-23 22:45 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-23 22:42 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-07-23 22:35 -------
8361 also have simular interesting results:
average OVL length: 44.709989
But I think my counting is wrong as we can have DECL in the chain.
--
What |Removed |Added
----------------------------------------------------------------------------
OtherBugsDependingO| |8361
nThis| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22635
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/22635] OVERLOAD should not be a linked list of trees
2005-07-23 20:32 [Bug c++/22635] New: OVERLOAD should not be a linked list of trees pinskia at gcc dot gnu dot org
` (2 preceding siblings ...)
2005-07-23 22:42 ` pinskia at gcc dot gnu dot org
@ 2005-07-23 22:45 ` pinskia at gcc dot gnu dot org
2005-07-24 3:36 ` gdr at integrable-solutions dot net
` (5 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-23 22:45 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-07-23 22:44 -------
Though fixing that still gives the same number.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22635
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/22635] OVERLOAD should not be a linked list of trees
2005-07-23 20:32 [Bug c++/22635] New: OVERLOAD should not be a linked list of trees pinskia at gcc dot gnu dot org
` (3 preceding siblings ...)
2005-07-23 22:45 ` pinskia at gcc dot gnu dot org
@ 2005-07-24 3:36 ` gdr at integrable-solutions dot net
2005-07-24 6:28 ` bangerth at dealii dot org
` (4 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: gdr at integrable-solutions dot net @ 2005-07-24 3:36 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From gdr at integrable-solutions dot net 2005-07-24 03:32 -------
Subject: Re: New: OVERLOAD should not be a linked list of trees
"pinskia at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:
| I noticed this when looking at compile time / memory usage of PR
| 8361 and I noticed that OVERLOAD is
| currently a link list and we only use about 2 of the fields in the
| tree which seems like a waste for a full
| tree. I started to change it to be a VEC but ran into problems as
| it looks like we can be in the middle of the linked list but I did
| not check for sure.
A VEC is good for collections that do not expand often -- like temlate
parameter list after parsing, or member functions after class definition.
Consequently a vector is not a good use for reprensenting overload
sets in C++ -- they are dynamic entities that grow as the translation
unit is being compiled.
Getting rid of TREE_LIST does not necessarily mean mechanical
replacement with a VEC.
A plain single linked list should be sufficient.
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22635
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/22635] OVERLOAD should not be a linked list of trees
2005-07-23 20:32 [Bug c++/22635] New: OVERLOAD should not be a linked list of trees pinskia at gcc dot gnu dot org
` (4 preceding siblings ...)
2005-07-24 3:36 ` gdr at integrable-solutions dot net
@ 2005-07-24 6:28 ` bangerth at dealii dot org
2005-07-24 6:50 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: bangerth at dealii dot org @ 2005-07-24 6:28 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bangerth at dealii dot org 2005-07-24 04:59 -------
I would imagine that in real world, there are either a rather small number
of overloads of a name (less than five) or very many (more than 20 or 30).
Most code I've seen don't use many overloads (falling into the first class)
but there are a few cases in libstdc++, especially in the streams and strings
libraries, that use very many overloads. I don't know if knowledge of such
overload set size statistics help any in finding an appropriate data
structure,
though...
W.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22635
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/22635] OVERLOAD should not be a linked list of trees
2005-07-23 20:32 [Bug c++/22635] New: OVERLOAD should not be a linked list of trees pinskia at gcc dot gnu dot org
` (5 preceding siblings ...)
2005-07-24 6:28 ` bangerth at dealii dot org
@ 2005-07-24 6:50 ` pinskia at gcc dot gnu dot org
2005-07-24 13:16 ` giovannibajo at libero dot it
` (2 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-24 6:50 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-07-24 06:28 -------
If you look at both PR 8361 and 12850, they average both more than 40 Overloadeds. Those are both
real code so I don't know why people think this is stupid. Also linked lists especially with extra
locations still available is stupid. Look OVERLOAD only takes at max a pointer and boolean. The type is
shared.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22635
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/22635] OVERLOAD should not be a linked list of trees
2005-07-23 20:32 [Bug c++/22635] New: OVERLOAD should not be a linked list of trees pinskia at gcc dot gnu dot org
` (6 preceding siblings ...)
2005-07-24 6:50 ` pinskia at gcc dot gnu dot org
@ 2005-07-24 13:16 ` giovannibajo at libero dot it
2005-07-24 13:25 ` pinskia at gcc dot gnu dot org
2005-08-06 6:47 ` pinskia at gcc dot gnu dot org
9 siblings, 0 replies; 12+ messages in thread
From: giovannibajo at libero dot it @ 2005-07-24 13:16 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From giovannibajo at libero dot it 2005-07-24 12:40 -------
Can you measure how much memory do all the overload nodes take in the big
testcases? Theoretically, an OVERLOAD could measure 8 bytes or so (on 32 bit
systems). So we currently waste more than 100 bytes per each node, but if there
are not so many of them it is not important.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22635
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/22635] OVERLOAD should not be a linked list of trees
2005-07-23 20:32 [Bug c++/22635] New: OVERLOAD should not be a linked list of trees pinskia at gcc dot gnu dot org
` (7 preceding siblings ...)
2005-07-24 13:16 ` giovannibajo at libero dot it
@ 2005-07-24 13:25 ` pinskia at gcc dot gnu dot org
2005-08-06 6:47 ` pinskia at gcc dot gnu dot org
9 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-24 13:25 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-07-24 13:23 -------
PR 12850 has the numbers.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22635
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/22635] OVERLOAD should not be a linked list of trees
2005-07-23 20:32 [Bug c++/22635] New: OVERLOAD should not be a linked list of trees pinskia at gcc dot gnu dot org
` (8 preceding siblings ...)
2005-07-24 13:25 ` pinskia at gcc dot gnu dot org
@ 2005-08-06 6:47 ` pinskia at gcc dot gnu dot org
9 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-06 6:47 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-06 06:47 -------
Confirmed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2005-08-06 06:47:46
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22635
^ permalink raw reply [flat|nested] 12+ messages in thread