Perfect Hashing for Method Dispatch with Dynamic Typing and Dynamic Compilation - LIRMM - Laboratoire d’Informatique, de Robotique et de Microélectronique de Montpellier Accéder directement au contenu
Rapport Année : 2012

Perfect Hashing for Method Dispatch with Dynamic Typing and Dynamic Compilation

Roland Ducournau

Résumé

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.
Fichier non déposé

Dates et versions

lirmm-00684484 , version 1 (02-04-2012)

Identifiants

  • HAL Id : lirmm-00684484 , version 1

Citer

Roland Ducournau. Perfect Hashing for Method Dispatch with Dynamic Typing and Dynamic Compilation. RR-12010, 2012, pp.28. ⟨lirmm-00684484⟩
171 Consultations
0 Téléchargements

Partager

Gmail Facebook X LinkedIn More