[cfe-commits] [PATCH] cindex.py optimization

Tobias Grosser tobias at grosser.es
Sun Aug 19 03:39:16 PDT 2012


On 08/19/2012 02:52 AM, Francisco Lopes da Silva wrote:
> Hi Tobias, here's the data with and without the strings comparisons

[...]

> The rate between the two is .293/.145 = 2.02. So the truth is that
> nearly all the benefits got in the Format
> phase came by avoiding string comparisons, the caching does nearly
> nothing /in this case/ because, in
> clang_complete, hardly there's double calls for the methods that are
> caching results.

Hi Francisco,

you are right. Avoiding string comparisons helps a lot. I did not see it 
as I was comparing with Gregory's cindex.py version, which also avoids 
string comparisons due to the use of different data structures. 
Comparing again, I see that your version is even a little bit faster as 
the one from Gregory. Also, your patch seems to address this problem 
more directly.

I would like to push the following two patches. What do you think?

Tobi

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-CachedProperty-to-CompletionChunk.patch
Type: text/x-patch
Size: 2090 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120819/aaa0a6de/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Avoid-string-comparisions-in-CompletionChunk.patch
Type: text/x-patch
Size: 1750 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120819/aaa0a6de/attachment-0001.bin>


More information about the cfe-commits mailing list