floodlight/loxigen — pull request #210 by rlane (2014-02-25 08:09:38+00:00)
Title: loci: chunk multiple classes into each C file

Reviewer: @andi-bigswitch

Parsing headers was taking more than half of the compile time for many
classes. By putting multiple classes into a single C file we amortize the cost
of header parsing. These C files are still much smaller than the old loci.c.

I also experimented with chunking the list and header class files, but there
are relatively few of these and so there was little gain.

The code size reduction is presumably due to better sharing of code between
similar classes. Since the classes are sorted by name before chunking the
action, instruction, etc inheritance hierarchies will be grouped together.

Results: time make -j4 loci.a: -44% (27.4s to 15.4s) strip loci.a && du -sh
loci.a: -25% (2.3 MB to 1.7 MB)