arXiv · 2102.13516
AwkwardForth: accelerating Uproot with an internal DSL
Abstract
File formats for generic data structures, such as ROOT, Avro, and Parquet, pose a problem for deserialization: it must be fast, but its code depends on the type of the data structure, not known at compile-time. Just-in-time compilation can satisfy both constraints, but we propose a more portable solution: specialized virtual machines. AwkwardForth is a Forth-driven virtual machine for deserializing data into Awkward Arrays. As a language, it is not intended for humans to write, but it loosens the coupling between Uproot and Awkward Array. AwkwardForth programs for deserializing record-oriented formats (ROOT and Avro) are about as fast as C++ ROOT and 10-80$\times$ faster than fastavro. Columnar formats (simple TTrees, RNTuple, and Parquet) only require specialization to interpret metadata and are therefore faster with precompiled code.
Explore related subjects
Keep this discovery
Jim Pivarski, Ianna Osborne, Pratyush Das, David Lange, Peter Elmer. 2021-02-24. AwkwardForth: accelerating Uproot with an internal DSL. https://doi.org/10.1051/epjconf/202125103002
Cite the original work for its findings. Save a collection to share your selection of sources.