(实际上)调度二进制方法的紧边界
(Really) Tight bounds for dispatching binary methods
摘要:
我们考虑二进制调度问题起源于面向对象的编程。我们希望预处理类的层次结构和方法的集合,以便在运行时给定一个函数调用,我们能够检索可以用参数的实际类型调用的最专门的实现。对于二进制分派,其中方法正好采用两个参数,对数查询时间是可能的,即使允许结构采用线性空间。不幸的是,实现这种复杂性的已知解决方案需要超线性时间来构建结构。使用不同的想法,我们能够在(确定性的)线性时间和空间中构建一个结构,允许在相同的对数时间内调度二进制方法。然后,我们将展示如何将查询时间提高到略低于对数的水平,如果我们想保持结果结构的大小接近线性,那么由于一些已知的下限,这很容易被视为最佳。
英文摘要:
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 already known lower bounds if we want to keep the size of the resulting structure close to linear.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。