[cfe-dev] Memory and time consumption for larger files, mistake in measurement

ihusar ihusar at fit.vutbr.cz
Mon Mar 29 09:10:27 PDT 2010


Hello, right after I sent previous message, I realized that I had wrong  
paths set,
sorry for that.
The previous results were for unoptimized clang,
here i fix it and results are for optimized clang.
Now the times match those of llvm-g++, however the huge memory consumption,
especially compared to standard gcc, did not change.
I am not sure if this is still a problem, however, on a 32-bit machine,
it will not be possible to compile the testing code.

As clang was used:
$clang --version
clang version 1.5 (trunk 99809)
Target: x86_64-unknown-linux-gnu

With *** are marked new measurement results.


>
> 1) g++ -DLISSOM_SEM -O0 -c -o tst.o clang-large-source.c
> (time is only illustrative, because object code file is generated)
> time: 12m17.064s
> top memory approx: 2.6 GB
>
>
> 2) llvm-g++ -DLISSOM_SEM -O0 -c --emit-llvm -o tst.bc  
> clang-large-source.c
> time: 6m28.518s
> top memory approx: 8 GB
>

*** 3a) clang -DLISSOM_SEM -DCLANG -c -O0 -o tst.bc clang-large-source.c
*** time: 1m55s (avg. from 3 runs)    (this is almost fine, later I would  
report what will happen on a computer with more memory)
*** top memory  approx 8.5 GB



> for 2,5 MB file:
> g++ (with obj. code generation): 1m 6s
> llvm-g++: 7 s


*** time clang -DLISSOM_SEM -DCLANG -O0 -c -emit-llvm  2_5MB_clang_test.c
*** clang: 8.5 s (avg from 3 runs)


> for 1 MB file:
>
> g++ (with obj. code generation): 23 secs
> llvm-g++: 2.5 s

*** time clang -DLISSOM_SEM -DCLANG -O0 -c -emit-llvm  1MB_clang_test.c
*** clang time: 2.7 secs (avg from 3 runs)






More information about the cfe-dev mailing list