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: [Patch] tr1::hashtable::operator[] (final)


Paolo Carlini wrote:
Hi,

eventually, I decided to go for something simpler (and performance-wise more effective), leaving the insertion with hint alone (maybe I will reconsider it soon): I'm just splitting out the second part of insert(..., true_type) and calling it from operator[]. In this form everything is pretty straightforward and is suitable for 4_1-branch too.

It's also a tiny bit faster with my real use case.

I think a small comment like
// reuse hash code and and current bucket for hint-like insertion
might help to understand what's going on.

A general question: Will these patches find their way into the 4_0-branch as well? I'm asking since I'd like to use unordered_map which is now much faster in our project. However, our users probably just use distros and those might consider to use 4.0.4 in the future... Well, the more conservative ones might, anyway.


P.S. Peter, for your future contributions, do you have a Copyright Assignment on file?!?


Unfortunately, no. I didn't think I'd make any code contributions ;-) Right now I'm not affiliated with any company/university. Am I still required to file the assignment?


Thanks for the great job!
Peter


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