Hello, NumericLiteralParser::GetIntegerValue() does a conservative estimate on the size of numbers that can fit into uint64_t. This bound can be improved. See the attached patch.
I see a 0.240s -> 0.160s reduction on -fsyntax-only time in a Release
clang build on a source file generated by the following python script:
for i in xrange(0, 2000):
print "void func{0}() {{".format(i)
for j in xrange(0, 100):
print "123456789012345678;"
print "}"
Please review. I know that this patch sort-of falls into the
"obvious" bucket, but I wanted to make sure that this patch is
appropriate.
Dmitri
--
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <[email protected]>*/
optimize-NumericLiteralParser-GetIntegerValue-v1.patch
Description: Binary data
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
