QHash vs. unordered_map

Andreas Pakulat apaku at gmx.de
Sat Nov 24 23:59:55 UTC 2012


Hi,

Just wanted to note that you basically only have confirmation that gcc 4.7
with qt 4.8.x x>=2 is faster. That being said I doubt the performance
difference between the hash types makes an actual noticable  for the cases
where its used.

Andreas

Am Samstag, 24. November 2012 schrieb Milian Wolff :

> On Wednesday 21 November 2012 20:15:58 Milian Wolff wrote:
> > Hey all,
> >
> > can you please share the numbers for a release build running the
> following
> > test from KDevplatform:
> >
> > language/duchain/tests/itemrepositorytest.shell testStringHashPerformance
> >
> > See 7465cc39f13edc4a4e99cf033a5751c8339018e0 for my numbers. If people
> can
> > confirm this, then I'll refactor our code to use QHash and drop the nasty
> > ifdef code.
> >
> > Cheers
> >
> > PS: Looking at the usage of hash_map in KDevelop's cpp parser, I'd say
> that
> > its just overdesigned and could also easily be using a QHash.
>
> Since I only got confirmations about this finding, I've now committed the
> refactorings to both KDevelop and KDevplatform. The code is now much
> cleaner
> and apparently also faster - neat!
>
> Note: We now compile *without* C++11 mode everywhere. This means less
> accidental breakages. For KDevelop 4.6 I want to change that and make a
> subset
> of C++11 a mandatory dependency, but for that see the separate mailing list
> thread.
>
> Cheers
> --
> Milian Wolff
> mail at milianw.de <javascript:;>
> http://milianw.de
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20121125/dd734f64/attachment.html>


More information about the KDevelop-devel mailing list