Elegance of a database API matters. Frequently, database APIs suit the database designer, rather than the programmer's desire for elegance and efficiency. This article pursues both: firstly, by comparing the Lua APIs for two separate databases, Redis and YottaDB. Secondly, it looks under the API covers at how object orientation can help to retain API efficiency. Finally, it benchmarks both databases using each API to implement a 3n+1 sequence generator (of Collatz Conjecture fame). It covers the eccentricities of the Lua APIs, the databases, and the nifty choice of benchmark tool, presenting benchmark results of each database's unique design.
Cite
@article{arxiv.2411.08206,
title = {Lua API and benchmark design using 3n+1 sequences: Comparing API elegance and raw speed in Redis and YottaDB databases},
author = {Berwyn Hoyt},
journal= {arXiv preprint arXiv:2411.08206},
year = {2025}
}
Comments
18 pages, 1 figures. Submitted for publication in Journal of Computer Languages special edition on Lua