[PATCH] Canonical types (1/3)
Doug Gregor
doug.gregor@gmail.com
Wed Nov 29 21:34:00 GMT 2006
On 28 Nov 2006 08:43:00 -0800, Ian Lance Taylor <iant@google.com> wrote:
> Your compile time measurements are impressive. I am curious, though:
> have you done any measurements of memory usage, e.g., -fmem-report?
Nothing extensive. Randomly trying one of the tests from Boost,
-fmem-report has this summary on memory usage:
Without my patch: Total 128M 111M 1180k
With my patch: Total 129M 113M 1194k
So, we're using a little bit more memory, because we've added some
fields to every _TYPE node, and we sometimes create extra type nodes
for canonical types that we weren't creating before. However, we're
hashing more nodes with this patch, so the memory utilization didn't
increase by as much as I would have expected.
In this particular test case (from the Boost Graph Library), the
patched compiler is 11% faster than the unpatched compiler.
Cheers,
Doug
-fmem-report -ftime-report results without my patch:
Memory still allocated at the end of the compilation process
Size Allocated Used Overhead
8 440k 437k 10k
16 372k 370k 5952
32 13M 13M 159k
64 2380k 2377k 23k
128 100k 97k 900
256 704k 702k 5632
512 736k 735k 5888
1024 1060k 1057k 8480
2048 132k 132k 1056
4096 64k 60k 512
8192 56k 48k 224
16384 112k 112k 224
32768 544k 544k 544
65536 192k 192k 96
131072 256k 256k 64
262144 256k 0 32
524288 512k 0 32
1048576 1024k 0 32
2097152 2048k 0 32
4194304 4096k 0 32
8388608 8192k 0 32
52 4284k 4234k 41k
44 680k 678k 6800
104 8000k 7918k 70k
92 13M 13M 121k
80 10092k 10051k 88k
88 6988k 6904k 61k
24 20M 20M 264k
48 2132k 2123k 20k
272 3656k 3637k 28k
72 5456k 5368k 47k
28 4464k 4454k 52k
112 4920k 4839k 43k
36 3024k 3000k 32k
12 1556k 1551k 27k
40 4704k 4684k 50k
Total 128M 111M 1180k
String pool
entries 48454
identifiers 48454 (100.00%)
slots 65536
bytes 8349k (831k overhead)
table size 256k
coll/search 0.6192
ins/search 0.1394
avg. entry 176.45 bytes (+/- 286.60)
longest entry 4624
??? tree nodes created
(No per-node statistics)
Type hash: size 32749, 20644 elements, 1.196386 collisions
DECL_DEBUG_EXPR hash: size 1021, 0 elements, 0.000000 collisions
DECL_VALUE_EXPR hash: size 1021, 0 elements, 0.000000 collisions
no search statistics
Execution times (seconds)
callgraph construction: 0.01 ( 0%) usr 0.00 ( 0%) sys 0.02 (
0%) wall 17 kB ( 0%) ggc
cfg cleanup : 0.00 ( 0%) usr 0.01 ( 1%) sys 0.00 (
0%) wall 0 kB ( 0%) ggc
preprocessing : 0.33 (10%) usr 0.13 (16%) sys 0.84
(17%) wall 2960 kB ( 2%) ggc
parser : 1.52 (46%) usr 0.32 (40%) sys 1.67
(34%) wall 95794 kB (71%) ggc
name lookup : 1.03 (31%) usr 0.32 (40%) sys 1.54
(31%) wall 25028 kB (19%) ggc
tree gimplify : 0.10 ( 3%) usr 0.00 ( 0%) sys 0.24 (
5%) wall 6298 kB ( 5%) ggc
tree CFG cleanup : 0.00 ( 0%) usr 0.00 ( 0%) sys 0.01 (
0%) wall 0 kB ( 0%) ggc
expand : 0.00 ( 0%) usr 0.00 ( 0%) sys 0.03 (
1%) wall 646 kB ( 0%) ggc
varconst : 0.30 ( 9%) usr 0.00 ( 0%) sys 0.33 (
7%) wall 2255 kB ( 2%) ggc
final : 0.01 ( 0%) usr 0.00 ( 0%) sys 0.02 (
0%) wall 69 kB ( 0%) ggc
symout : 0.00 ( 0%) usr 0.02 ( 3%) sys 0.01 (
0%) wall 16 kB ( 0%) ggc
TOTAL : 3.31 0.80 4.89
134458 kB
-fmem-report -ftime-report results without my patch:
Memory still allocated at the end of the compilation process
Size Allocated Used Overhead
8 440k 437k 10k
16 372k 370k 5952
32 13M 13M 159k
64 2380k 2377k 23k
128 100k 97k 900
256 704k 703k 5632
512 740k 736k 5920
1024 1060k 1058k 8480
2048 136k 134k 1088
4096 64k 60k 512
8192 56k 48k 224
16384 112k 112k 224
32768 544k 544k 544
65536 192k 192k 96
131072 256k 256k 64
262144 256k 0 32
524288 512k 0 32
1048576 1024k 0 32
2097152 2048k 0 32
4194304 4096k 0 32
8388608 8192k 0 32
52 4284k 4234k 41k
44 680k 678k 6800
104 21M 20M 189k
92 1880k 1856k 16k
80 10092k 10051k 88k
88 6988k 6904k 61k
24 20M 20M 264k
48 2132k 2123k 20k
272 3656k 3637k 28k
72 5456k 5368k 47k
28 4464k 4454k 52k
112 4920k 4839k 43k
36 3024k 3000k 32k
12 1556k 1551k 27k
40 4704k 4684k 50k
Total 129M 113M 1194k
String pool
entries 48454
identifiers 48454 (100.00%)
slots 65536
bytes 8349k (831k overhead)
table size 256k
coll/search 0.6192
ins/search 0.1394
avg. entry 176.45 bytes (+/- 286.60)
longest entry 4624
??? tree nodes created
(No per-node statistics)
Type hash: size 32749, 20715 elements, 1.184976 collisions
DECL_DEBUG_EXPR hash: size 1021, 0 elements, 0.000000 collisions
DECL_VALUE_EXPR hash: size 1021, 0 elements, 0.000000 collisions
no search statistics
Execution times (seconds)
callgraph construction: 0.00 ( 0%) usr 0.00 ( 0%) sys 0.01 (
0%) wall 17 kB ( 0%) ggc
preprocessing : 0.32 (11%) usr 0.11 (14%) sys 0.44
(11%) wall 2960 kB ( 2%) ggc
parser : 1.53 (51%) usr 0.29 (37%) sys 1.74
(45%) wall 97055 kB (71%) ggc
name lookup : 0.77 (26%) usr 0.35 (45%) sys 1.26
(33%) wall 25280 kB (19%) ggc
tree gimplify : 0.17 ( 6%) usr 0.02 ( 3%) sys 0.15 (
4%) wall 6298 kB ( 5%) ggc
expand : 0.01 ( 0%) usr 0.00 ( 0%) sys 0.00 (
0%) wall 646 kB ( 0%) ggc
varconst : 0.17 ( 6%) usr 0.01 ( 1%) sys 0.23 (
6%) wall 2324 kB ( 2%) ggc
global alloc : 0.00 ( 0%) usr 0.00 ( 0%) sys 0.01 (
0%) wall 15 kB ( 0%) ggc
final : 0.01 ( 0%) usr 0.00 ( 0%) sys 0.01 (
0%) wall 69 kB ( 0%) ggc
symout : 0.00 ( 0%) usr 0.00 ( 0%) sys 0.01 (
0%) wall 16 kB ( 0%) ggc
TOTAL : 2.98 0.78 3.86
136052 kB
More information about the Gcc-patches
mailing list