[cfe-commits] [PATCH] Fix for PR12222

Erik Verbruggen erik.verbruggen at me.com
Sat Dec 8 07:15:48 PST 2012


On Nov 27, 2012, at 22:01, Douglas Gregor <dgregor at apple.com> wrote:

> This is expected to be a performance win. Is it?

I think so. Disclaimer: I didn't do proper statistics, and my laptop is not super "quiet". I took basetexteditor.cpp and botan.cpp from Qt Creator, preprocessed them, and ran them through "time clang -fsyntax-only" 10 times. The best user times:

botan.cpp (102777 lines preprocessed):
Before patch:
real	0m1.580s
user	0m1.544s
sys	0m0.030s
After patch:
real	0m1.551s
user	0m1.514s
sys	0m0.034s
(so that's 2% faster?)

basetexteditor.cpp (78717 lines preprocessed):
Before patch:
real	0m0.980s
user	0m0.955s
sys	0m0.023s
After patch:
real	0m0.973s
user	0m0.948s
sys	0m0.021s
(so about .8% faster?)

Now I don't know if these files are proper tests, and how much the SourceRange/SourceLocations get queried. The reason I took botan.cpp is that it's doing public-key crypto, while basetexteditor.cpp has lots of declarations and short method definitions. Both are attached if someone wants to repeat the tests.

Any ideas on a better benchmark?

-- Erik.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: basetexteditor.cpp.ii.bz2
Type: application/x-bzip2
Size: 295749 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20121208/4d870af1/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: botan.cpp.ii.bz2
Type: application/x-bzip2
Size: 460659 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20121208/4d870af1/attachment-0001.bin>


More information about the cfe-commits mailing list