Theta Library

next up previous
Next: InterViews Library Up: Empirical Results Previous: Empirical Results

Theta Library

The standard Theta library comprises 16 classes and 19 abstract types, and several other small libraries are under development. Considering the two largest libraries, one implementing the OO7 database benchmark [CDN93], and another implementing the Labbase database [RSG95], there are a total of 51 abstract types and 45 classes. Table 1 shows the number of words of per-object dispatch overhead incurred by these classes with the bidirectional layout and with a standard C++ layout. Each entry in the table shows the number of classes that have a particular number of words of dispatch overhead. Of these classes, only one requires more than a single dispatch vector with the bidirectional layout. It occupies a position in the hierarchy very similar to C3 in Figure 11, and has two dispatch vectors.


Overhead (words) Bidirectional C++
1 44 23
2 1 17
3 0 4
4 0 1

Table 1: Theta library object overheads

The per-object space overhead is clearly lower for the bidirectional layout. Per-class space overhead is also less: the bidirectional layouts have a total of 46 dispatch vectors, compared to 73 in the C++ layout. The bidirectional dispatch vectors are larger on the average than the C++ dispatch vectors, but they do not repeat any information that is not also repeated by the C++ dispatch vectors. Since only one trampoline routine needs to be generated for the bidirectional layout, total space usage is smaller. However, per-class space usage is less important than per-object space usage, since the total number of objects in any significant program is likely to be much larger than the total number of classes in use.

Andrew C. Myers. Bidirectional Object Layout for Separate Compilation. Proceedings of OOPSLA '95, pp. 124-139.
Copyright © 1995 Association for Computing Machinery