A Probabilistic Model Revealing Shortcomings in Lua's Hybrid Tables

08/29/2022
by   Conrado Martínez, et al.
0

Lua (Ierusalimschy et al., 1996) is a well-known scripting language, popular among many programmers, most notably in the gaming industry. Remarkably, the only data-structuring mechanism in Lua, is an associative array called a table. With Lua 5.0, the reference implementation of Lua introduced hybrid tables to implement tables using both a hash table and a dynamically growing array combined together: the values associated with integer keys are stored in the array part, when suitable. All this is transparent to the user, which has a unique simple interface to handle tables. In this paper we carry out a theoretical analysis of the performance of Lua's tables, by considering various worst-case and probabilistic scenarios. In particular, we uncover some problematic situations for the simple probabilistic model where we add a new key with some fixed probability p>1/2 and delete a key with probability 1-p: the cost of performing T such operations is proved to be Ω(Tlog T) with high probability, instead of linear in T.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
12/27/2017

Cuckoo++ Hash Tables: High-Performance Hash Tables for Networking Applications

Hash tables are an essential data-structure for numerous networking appl...
research
07/06/2021

Irregular Invertible Bloom Look-Up Tables

We consider invertible Bloom lookup tables (IBLTs) which are probabilist...
research
08/31/2018

The use of Charts, Pivot Tables, and Array Formulas in two Popular Spreadsheet Corpora

The use of spreadsheets in industry is widespread. Companies base decisi...
research
09/13/2022

A Hash Table Without Hash Functions, and How to Get the Most Out of Your Random Bits

This paper considers the basic question of how strong of a probabilistic...
research
11/20/2022

Optimal resizable arrays

A resizable array is an array that can grow and shrink by the addition o...
research
01/18/2013

User Interface Tools for Navigation in Conditional Probability Tables and Elicitation of Probabilities in Bayesian Networks

Elicitation of probabilities is one of the most laborious tasks in build...
research
05/25/2019

LUTNet: speeding up deep neural network inferencing via look-up tables

We consider the use of look-up tables (LUT) to speed up and simplify the...

Please sign up or login with your details

Forgot password? Click here to reset