Skip to content

perf(arrow/compute): unify changing dictionaries incrementally - #1395

Open
fallintoplace wants to merge 5 commits into
apache:mainfrom
fallintoplace:perf/compute-incremental-dictionary-unique-20261020
Open

fallintoplace wants to merge 5 commits into
apache:mainfrom
fallintoplace:perf/compute-incremental-dictionary-unique-20261020

Conversation

@fallintoplace

@fallintoplace fallintoplace commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

What

Unify changing dictionary chunks incrementally in unique.

Why

The current path rebuilds and rehashes the accumulated dictionary for each changed chunk.

Implementation

  • Keep one dictionary unifier and remap each chunk's indices.
  • Build the output dictionary once after all chunks.

Benchmark

BenchmarkUniqueChunkedChangingDictionaries/chunks=256, Go 1.26.3, Apple M1 Pro, median of 5 runs.

Metric Before After Change
Time (ms/op) 59.99 1.64 36.6x faster
Allocated bytes (MB/op) 117.7 1.82 98.5% fewer bytes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant