Skip to content

DDIR: bump corgi to one Int; Float as its own scalar - #926

Merged
frankmcsherry merged 5 commits into
master-nextfrom
ddir-one-int
Oct 10, 2026
Merged

frankmcsherry merged 5 commits into
master-nextfrom
ddir-one-int

Conversation

@frankmcsherry

@frankmcsherry frankmcsherry commented Oct 10, 2026 •

Copy link
Copy Markdown
Member

Corgi's #74 replaced leaf widths and integer kinds with two leaf types, Int (exact within i64) and Float (f64).
This PR moves DDIR's corgi pin past it, and then gives DDIR a Float of its own.

Bump to one Int

DDIR's Int is corgi's Int, so the sign-bit swizzles (ToSigned, signed_order_view) are gone and division and ordered compares are corgi's own.

Corgi orders integers by signed value, so arrangement identifiers are i64 throughout join, reduce, and search.
The join walk now starts at i64::MIN; starting at 0 would skip negative keys (negative_keys_join).

Corgi chooses how to hold an integer column, and a mask or sum tag may be held as bytes.
present_key widens such a key to i64, so it is its own identifier rather than hashed (byte_held_integer_keys_are_presented_as_i64).
Arranged values are widened the same way, so every chunk's lanes can be borrowed.

&& and or read each operand as 0/1 (nonzero is true) before min/max, as ir::eval does.
hash shifts with shr_b64, and a bound that is not positive reduces to the identity.
Ordered compares now lower on any two same-shape values, by corgi's structural order.

Float

Value::Float replaces the one-variant F64 newtype over an encoded Int.
It compares, orders, and hashes by the total order, as corgi's Float does, and transcodes to a corgi Float column.
float is a declarable type.
The SNB harness reads Float(x) from server output in place of the newtype's payload.

Notes

The pin is corgi 9737792, which adds #75 on top of #74: Weave reads its tags at any integer storage, so list literals tag elements with Iota.
The u64 type name is retired; int and float are the scalar types.

Checks

  • cargo test --workspace; AoC 33/33 on both backends; the LDBC smoke, SNB catalogue (mixed at 1 and 4 workers, maintained at 4), and release explain suites.
  • Performance, codegen-units=1, interleaved, three runs each, identical outputs: arith 2.61–2.63s → 2.61–2.82s (one outlier), reach 2.03–2.04s → 2.00–2.03s, listord 3.12–3.38s → 3.12–3.16s.

🤖 Generated with Claude Code

frankmcsherry and others added 5 commits October 9, 2026 21:36
Corgi now has one integer type, `Int`, exact within i64, and DDIR's `Int` is it.
The sign-bit swizzles (`ToSigned`, `signed_order_view`) are gone, and division and ordered compares are corgi's own.

Corgi orders integers by signed value, so arrangement identifiers are `i64` throughout join, reduce, and search.
The join walk starts at `i64::MIN`, not 0, so negative keys are not skipped.

Corgi chooses how to hold an integer column, and a mask or tag may be held as bytes.
`present_key` widens such a key to `i64`, so it is its own identifier rather than hashed, and arranged values are widened the same way so that every chunk's lanes can be borrowed.

`&&` and `or` read each operand as 0/1 (nonzero is true) before `min`/`max`.
`hash` shifts with `shr_b64`, and a bound that is not positive reduces to the identity.
F64 ops reach corgi's `Float` through host kernels on the newtype payload, until DDIR has a Float of its own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`Value::Float` replaces the one-variant F64 newtype over an encoded `Int`.
It compares, orders, and hashes by the total order, as corgi's `Float` does, and transcodes to a corgi `Float` column.
The float ops apply to `Float` columns directly, and the payload kernels are gone.
`float` is a declarable type.

The SNB harness reads `Float(x)` from server output in place of the newtype's payload.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`u64` and `int` named the same signed integer, and `u64` misdescribed it.
The shape syntax now names `int` and `float`, and `u64` is an error pointing at `int`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`0..k as u8` is `0..(k as u8)`, which is empty at k = 256.
The tags are now `(0..k).map(|t| t as u8)`, and a test covers 1, 255, and 256 elements.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Corgi #75 lets `Weave` read its tags at any integer storage, so list literals tag their elements with `Iota` again, in place of a byte literal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@frankmcsherry
frankmcsherry merged commit 25b5933 into master-next Oct 10, 2026
6 checks passed
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