Perfect Hashing for Method Dispatch with Dynamic Typing and Dynamic Compilation - LIRMM - Laboratoire d’Informatique, de Robotique et de Microélectronique de Montpellier Access content directly
Reports Year : 2012

Perfect Hashing for Method Dispatch with Dynamic Typing and Dynamic Compilation

Roland Ducournau

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.
No file

Dates and versions

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

Identifiers

  • HAL Id : lirmm-00684484 , version 1

Cite

Roland Ducournau. Perfect Hashing for Method Dispatch with Dynamic Typing and Dynamic Compilation. RR-12010, 2012, pp.28. ⟨lirmm-00684484⟩
172 View
0 Download

Share

Gmail Mastodon Facebook X LinkedIn More