Perfect Hashing for Method Dispatch with Dynamic Typing and Dynamic Compilation

Roland Ducournau 1
1 MAREL - Models And Reuse Engineering, Languages
LIRMM - Laboratoire d'Informatique de Robotique et de Microélectronique de Montpellier
Abstract : In static typing, the receiver's static type is the key to efficient implementation of method invocation, and a recently proposed technique, based on perfect hashing of classes, cannot apply to dynamic typing because of the lack of static types. In this article, we propose a new application of perfect hashing to method dispatch in a dynamic typing, dynamic loading and single inheritance setting. The approach involves hashing method selectors instead of classes. However, as hashing all methods revealed itself to be space-inefficient, only overloaded methods, ie methods introduced by several classes, are hashed. The dispatch of non-overloaded methods is done as in single-subtyping, ie static typing and single inheritance. An adaptive-compilation protocol and an algorithm for hashing overloaded methods are proposed, and the approach is tested on Smalltalk benchmarks by simulating class loading at random.
Type de document :
RR-12010, 2012, pp.28
Liste complète des métadonnées
Contributeur : Roland Ducournau <>
Soumis le : lundi 2 avril 2012 - 11:27:00
Dernière modification le : jeudi 24 mai 2018 - 15:59:22


  • HAL Id : lirmm-00684484, version 1



Roland Ducournau. Perfect Hashing for Method Dispatch with Dynamic Typing and Dynamic Compilation. RR-12010, 2012, pp.28. 〈lirmm-00684484〉



Consultations de la notice