6–9 Jul 2026
Europe/Warsaw timezone

Growable Vectors and In-Place Row Operations: A data.table Perspective

8 Jul 2026, 13:00
20m
Talks (15-20 minutes) Talks

Speaker

Benjamin Schwendinger (Fraunhofer Austria Research GmbH)

Description

R’s copy-on-modify semantics make repeated growth and row-wise operations appear inherently expensive. Appending rows or incrementally building tabular structures typically triggers reallocation and copying. Recent versions of R now introduce an experimental resizable vector API, allowing vectors to be allocated with a maximum capacity and resized up to that capacity without reallocation.

This talk examines what this official API enables for high-performance data structures, using data.table as a case study. data.table has long relied on reference semantics and disciplined memory management to support efficient in-place column updates. With capacity-aware vectors available at the C level, amortized O(1) append patterns are now directly supported by R itself.

We explore how this mechanism can be used to enable efficient row growth and controlled row deletion, while respecting R’s sharing semantics, garbage collection, and attribute invariants. We discuss key constraints, including interactions with NAMED semantics, ALTREP materialization, serialization behavior, and cross-version compatibility.

Rather than changing R’s semantics, the resizable vector API formalizes a capacity concept that was previously implicit. This opens the door to safer, more predictable in-place operations in performance-critical R packages.

If you used AI tools or services to support the preparation of this submission, please state the name and reason for using each of them.

GPT-5.2 was used to improve grammar and sentence clarity.

Keywords: Please list up to 5 keywords to help us find the right session for your contribution. data.table, high-performance computing, memory optimization, in-place operations, R C API
Virtual Option This submission is for onsite presentation only
Video Recording Video sharing is fine
The author(s) agree(s) to take responsibility and be accountable for the contents of the submission and is/are authorized to present it. Confirm
Interested in serving as reviewer? benjamin.schwendinger@fraunhofer.at

Author

Benjamin Schwendinger (Fraunhofer Austria Research GmbH)

Presentation materials

There are no materials yet.