This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug c++/22635] OVERLOAD should not be a linked list of trees


------- 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


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