English

AwkwardForth: accelerating Uproot with an internal DSL

Programming Languages 2021-09-08 v1 High Energy Physics - Experiment

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.

Cite

@article{arxiv.2102.13516,
  title  = {AwkwardForth: accelerating Uproot with an internal DSL},
  author = {Jim Pivarski and Ianna Osborne and Pratyush Das and David Lange and Peter Elmer},
  journal= {arXiv preprint arXiv:2102.13516},
  year   = {2021}
}

Comments

11 pages, 2 figures, submitted to the 25th International Conference on Computing in High Energy & Nuclear Physics

R2 v1 2026-06-23T23:32:48.636Z