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

Further optimize SlottedArray #301

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Further optimize SlottedArray #301

wants to merge 5 commits into from

Conversation

benaadams
Copy link
Member

@benaadams benaadams commented Apr 4, 2024

Doesn't need to be two object references + length; can be 1 object ref + data length

Benchmarks

Before

Method Mean Error StdDev Code Size Allocated
Write_whole_page_of_data 10.067 us 0.0995 us 0.0930 us 2,458 B -
Read_existing_keys_prefix_different 11.866 us 0.1176 us 0.1100 us 1,425 B -
Read_existing_keys_suffix_different 9.123 us 0.0830 us 0.0735 us 1,439 B -
Read_nonexistent_keys 13.898 us 0.0493 us 0.0437 us 1,431 B -
Hash_collisions 18.141 us 0.3537 us 0.6287 us 3,329 B -

After

Method Mean Error StdDev Code Size Allocated
Write_whole_page_of_data 9.890 us 0.1350 us 0.1263 us 2,525 B -
Read_existing_keys_prefix_different 10.573 us 0.1386 us 0.1296 us 1,556 B -
Read_existing_keys_suffix_different 9.196 us 0.1169 us 0.1093 us 1,471 B -
Read_nonexistent_keys 13.716 us 0.1773 us 0.1659 us 1,480 B -
Hash_collisions 51.047 us 0.6043 us 0.5653 us 3,439 B -

@benaadams benaadams requested a review from Scooletz April 4, 2024 04:59
@benaadams benaadams added the 🐌 performance Perofrmance related issue label Apr 4, 2024
Copy link
Contributor

@Scooletz Scooletz left a comment

Choose a reason for hiding this comment

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

@benaadams Looks like not that much gains and the Hash_collisions benchmark went through the roof? Would you have some time to take a look at it? I've added results to the description

Copy link

github-actions bot commented Apr 9, 2024

Code Coverage

Package Line Rate Branch Rate Health
Paprika 85% 79%
Summary 85% (3559 / 4191) 79% (1102 / 1394)

Minimum allowed line rate is 75%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐌 performance Perofrmance related issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants