Skip to content

Conversation

@robert3005
Copy link
Contributor

@robert3005 robert3005 commented Feb 10, 2026

As a followup to the massive scalar refactor I have refactored the truncation logic to not require typed scalars. Since we now guarantee that values will be coerced to appropriate scalar value we can implement truncation logic over the underlying primitives

closes #6413

@robert3005 robert3005 added the changelog/chore A trivial change label Feb 10, 2026
@codspeed-hq
Copy link

codspeed-hq bot commented Feb 10, 2026

Merging this PR will improve performance by 34.63%

⚡ 5 improved benchmarks
✅ 1130 untouched benchmarks
⏩ 1268 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation take_map[(0.05, 0.1)] 792 µs 594.2 µs +33.28%
Simulation take_map[(0.1, 0.5)] 2.8 ms 2.1 ms +34.63%
Simulation take_map[(0.1, 0.1)] 1,118.8 µs 926.8 µs +20.72%
Simulation take_map[(0.1, 1.0)] 4.7 ms 3.5 ms +34.63%
Simulation take_map[(0.05, 1.0)] 4.1 ms 3.1 ms +30.73%

Comparing rk/inplacetruncation (4c5edf7) with develop (aa55054)

Open in CodSpeed

Footnotes

  1. 1268 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

…s and can operate in place

Signed-off-by: Robert Kruszewski <[email protected]>
Signed-off-by: Robert Kruszewski <[email protected]>

#[test]
fn lower_bound() {
let utf8 = Scalar::utf8("snowman⛄️snowman", Nullability::NonNullable);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't believe we're losing this amazing test

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh it just moved 😍

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

Labels

changelog/chore A trivial change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lower and upper bound scalars

3 participants