In a final round of experiments, we validated the quality of the code produced by the stub compiler after an optimization stage was added. We used the ASN.1 specifications for X.400 P1 and Z39.50 as benchmarks. For these benchmarks, we manually estimated the values of the arc-weights (Hoschka, 1995). The parameters used for the heuristic frequency prediction were set as follows: , . We then varied the compiler parameter controlling the code size increase due to procedure-driven code. is defined as follows: , where is size of the code when full optimization is used ( for all i).
was to 25%, 50%, 75% and 100%. Figure 2 shows the results of these experiments. On the x-axis, we give the code size measured for each value of . On the y-axis, we give the number of calls to the interpreter that are eliminated by generating procedure-driven code.
Setting to saves 68% of the interpreter calls for X.400 and 55% of the interpreter calls for Z39.50. Setting to saves 94% of the calls in X.400 and 87% of the calls in Z39.50. Thus, we find that due to the optimizer we generate presentation conversion code that is nearly as fast as fully optimized code, but requires only a small fraction of the maximal code size.
Figure 2: Locality in X.400-P1 (left) and Z39.50 (right) benchmarks