Google hash classes

Andreas Pakulat apaku at gmx.de
Sun May 19 15:31:44 UTC 2013


Hi,

On Sun, May 19, 2013 at 1:41 PM, Milian Wolff <mail at milianw.de> wrote:

> On Sunday 12 May 2013 19:32:38 Aleix Pol wrote:
> > Hi,
> > I just remembered we have these classes in our codebase
> > (kdevplatform/utils/google) and I thought that it might be a good idea to
> > use a newer version [1]. According to the changelogs there's been many
> > improvements.
> >
> > Also I saw that we're installing these classes, it's not being used in
> > KDevelop, so I'd suggest to stop installing those classes' headers. Also
> > they're not being exported as well.
>
> Sure, sounds good. But... where do we actually use them? Do we need them?
> Should we use them in more places?
>

The two hash maps are specifically optimized for speed or memory-efficiency
respectively. The duchain uses the fast variant for its ImportsHash type.
Not sure what that is. According to the commit log it was introduced for
usage with small cache's as it is (or was) twice as fast as stl's hash_map.

In the past it was used for various things in duchain, but it seems this is
not the case anymore. So maybe its not needed or someone refactored the
code and switched from the google types back to Qt types. For example one
case was in duchainlock.cpp (the ReaderMap which does not exist anymore),
another case was m_chainsByIndex in duchain.cpp which is not a map anymore.

Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20130519/2119c211/attachment.html>


More information about the KDevelop-devel mailing list