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

Improve preloading in SortedList #94

Merged
merged 1 commit into from
Oct 25, 2024
Merged

Conversation

Mukundan314
Copy link
Collaborator

@bjorn-martinsson would using chunk size of block_size >> 1 be better?

@bjorn-martinsson
Copy link
Collaborator

I think this is a nice change. It worked the way it did mostly because I was lazy / I wanted to minizime possibility of bugs by initializing the sorted list in the simplest way / I didn't really care about the performance of initialization.

I'm not sure if filling up the blocks to max is good or bad. It could be that half filled is better. I'm really not sure. Worst case for the sorted list should be inserts in decreasing order, and in that case max filled blocks would be better.

@Mukundan314
Copy link
Collaborator Author

I'll work on setting up some benchmarks in a future PR to test different block fill rates and see if they actually make any difference. For now, this should be an improvement over the current initialization.

@bjorn-martinsson
Copy link
Collaborator

I'll work on setting up some benchmarks in a future PR to test different block fill rates and see if they actually make any difference. For now, this should be an improvement over the current initialization.

Agreed. Lets go with filled blocks for now. The most common usecase if it starts up filled is probably removals anyways.

@Mukundan314 Mukundan314 merged commit 4cdfa95 into master Oct 25, 2024
10 of 12 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.

3 participants