Indico has been updated to v3.3. See our blog post for details on this release. (OTG0146394)

AwkwardForth: accelerating Uproot with an internal DSL

May 19, 2021, 6:32 PM
Short Talk Offline Computing Software


Jim Pivarski (Princeton University)


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× faster than fastavro. Columnar formats (simple TTrees, RNTuple, and Parquet) only require specialization to interpret metadata and are therefore faster with precompiled code.

Primary authors

Jim Pivarski (Princeton University) Ianna Osborne (Princeton University) Pratyush Das (Institute of Engineering and Management, Kolkata) David Lange (Princeton University (US)) Peter Elmer (Princeton University (US))

Presentation materials