Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make check_and_insert & find_old_row and friends do less checks #2192

Merged
merged 1 commit into from
Jan 31, 2025

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Jan 29, 2025

Description of Changes

In general, what this PR achieves is to remove various bounds checks and type checks in relation to index lookups and insertions.

This shows up in flamegraphs as getting rid of a ReadColumn::read_column and shrinking the share of RowRef::{project -> project_unchecked} as well as reducing the self-time of confirm_insertion, values_in_range.

API and ABI breaking changes

None.

Expected complexity level and risk

3, plenty of unsafe was added but the proofs/requirements are mostly boring plumbing. Still, it is unfortunate :(

Testing

Existing tests have been amended.

@Centril Centril force-pushed the centril/unchecked-index-insertion branch from 7b225a8 to 4e221d5 Compare January 29, 2025 22:29
@Centril Centril marked this pull request as ready for review January 29, 2025 22:30
@Centril Centril requested a review from gefjon January 29, 2025 22:54
Copy link
Contributor

@gefjon gefjon left a comment

Choose a reason for hiding this comment

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

I agree with your reasoning in the safety comments. I'll leave it to you to decide whether the proliferation of unsafe is worth the performance gains.

@Centril Centril added this pull request to the merge queue Jan 31, 2025
Merged via the queue into master with commit 6f20597 Jan 31, 2025
13 checks passed
@Centril Centril deleted the centril/unchecked-index-insertion branch January 31, 2025 18:28
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.

2 participants