This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/22635] OVERLOAD should not be a linked list of trees
- From: "gdr at integrable-solutions dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Jul 2005 03:32:33 -0000
- Subject: [Bug c++/22635] OVERLOAD should not be a linked list of trees
- References: <20050723202503.22635.pinskia@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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