[llvm-commits] [cfe-commits] [PATCH] share code between StringRef and ArrayRef

Jay Foad jay.foad at gmail.com
Fri Apr 15 02:58:00 PDT 2011


On 14 April 2011 13:35, Benjamin Kramer <benny.kra at googlemail.com> wrote:
> Have you checked the compile time impact of this? StringRef.h is included everywhere and ArrayRef.h pulls in Smallvector and Vector which are both big headers. I don't think this is worth it.

In lib/Support/ there 68 source files, of which 38 (directly or
indirectly) include StringRef.h, of which only 1 also includes
ArrayRef.h.

Here is the time it took to do 5 runs of "make -j2" in that directory
on my Ubuntu 10.10 system, before my changes:

real	0m16.599s
real	0m16.629s
real	0m16.597s
real	0m16.605s
real	0m16.564s

and after my changes:

real	0m17.217s
real	0m17.254s
real	0m17.180s
real	0m17.193s
real	0m17.232s

I'll drop the patch!

Thanks,
Jay.



More information about the llvm-commits mailing list