This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [Patch] tr1::hashtable::operator[] (final)
- From: Peter Doerfler <gcc at pdoerfler dot com>
- To: Paolo Carlini <pcarlini at suse dot de>
- Cc: libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Tue, 16 May 2006 10:47:04 +0200
- Subject: Re: [Patch] tr1::hashtable::operator[] (final)
- References: <4468A51B.4050601@suse.de>
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