(Really) Tight bounds for dispatching binary methods
Pawel Gawrychowski

TL;DR
This paper presents a new method for binary dispatching in object-oriented programming that achieves logarithmic query time with linear preprocessing, improving over previous solutions that required superlinear construction time.
Contribution
It introduces a linear-time, linear-space data structure for binary dispatching with logarithmic query time, and further refines query time to slightly sublogarithmic, matching known lower bounds.
Findings
Linear-time construction of dispatching structure
Logarithmic query time achieved
Sublogarithmic query time optimized
Abstract
We consider binary dispatching problem originating from object oriented programming. We want to preprocess a hierarchy of classes and collection of methods so that given a function call in the run-time we are able to retrieve the most specialized implementation which can be invoked with the actual types of the arguments. For the binary dispatching, where the methods take exactly two arguments, logarithmic query time is possible, even if the structure is allowed to take linear space. Unfortunately, known solutions achieving such complexity require superlinear time for constructing the structure. Using a different idea we are able to construct in (deterministic) linear time and space a structure allowing dispatching binary methods in the same logarithmic time. Then we show how to improve the query time to slightly sublogarithmic, which is easily seen to be optimal as a consequence of some…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsOptimization and Search Problems · Complexity and Algorithms in Graphs · Algorithms and Data Compression
