Contents
Page-10
Prev
Next
Page+10
Index
Improving OOP Efficiency
- Use table lookup (array of method addresses)
to make method lookup fast (C++).
- Cache selector and method at lowest class level
to avoid search (Self).
- Compile specialized methods
``just in time'' (JIT) when first used:
- method calls can be converted to function calls when the class is known
- small methods such as obj.getX() can be compiled
in-line
- partial evaluation may improve
efficiency