Skip to content

Replace the cereal library with our own encoding and decoding functions - #43

Merged
mzabani merged 17 commits into
masterfrom
replace-cereal-library
Aug 8, 2026
Merged

Replace the cereal library with our own encoding and decoding functions#43
mzabani merged 17 commits into
masterfrom
replace-cereal-library

Conversation

@mzabani

@mzabani mzabani commented Aug 5, 2026

Copy link
Copy Markdown
Owner

This is ~6% faster in the Tuple Stream benchmark, and allocates 13% less memory in total, not to mention one fewer dependency.

But most of all, binary COPY now runs in half the time it used to!

TODO for future PRs:

  • Test bitwise operations for optimistically decoding two Int32s in a sequence as a Word64 (a column size + a column's Int32 value, a very common type in queries, so why not?)
  • Check if UTF8 decoding overhead is significant with a new data type. If it isn't, ask text's maintainers if there's an unsafe UTF8 decoding function that assumes valid UTF8.
  • Try replacing our CPS parser with one that keeps track of its current position as a mutable Int in the heap?

@mzabani
mzabani force-pushed the replace-cereal-library branch from 30dc0b6 to b5b0ac6 Compare August 5, 2026 21:26
@mzabani
mzabani marked this pull request as ready for review August 8, 2026 17:41
@mzabani
mzabani force-pushed the replace-cereal-library branch from 2518923 to 9f50e46 Compare August 8, 2026 17:42
@mzabani mzabani changed the title Try to replace cereal with our own encoding functions Replace the cereal library with our own encoding and decoding functions Aug 8, 2026
@mzabani
mzabani force-pushed the replace-cereal-library branch from d1aa404 to 49fb312 Compare August 8, 2026 23:20
@mzabani
mzabani merged commit 9692984 into master Aug 8, 2026
3 checks passed
@mzabani
mzabani deleted the replace-cereal-library branch August 8, 2026 23:46
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