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

Pooled span dicitionary direct pointer #455

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

Scooletz
Copy link
Contributor

@Scooletz Scooletz commented Dec 19, 2024

This PR changes PooledSpanDictionary to use pointers rather than relative addresses that need to then transformed before accessing. This unfortunately makes the address size twice as big (from uint to byte*). When the Root PageCount is increased to make it big enough to keep the same number of buckets (128kb for the root instead of the earlier 64kb), the new version wins.

Benchmarks

Read_write_small has been modified.

Before pointer

Method Mean Error StdDev Gen0 Code Size Allocated
Read_from_big_dict 174,569.2261 ns 3,233.0694 ns 3,024.2151 ns - 410 B -
Enumerate_big_dict 69,030.7471 ns 670.5640 ns 627.2460 ns - 207 B -
Read_missing_with_hash_collisions 207,001.1198 ns 2,432.6261 ns 2,275.4799 ns - 416 B -
Read_missing_with_no_hash_collisions 169,260.6755 ns 1,962.7596 ns 1,835.9666 ns - 435 B -
Read_write_small 3,351.7085 ns 22.0201 ns 18.3878 ns 1,364 B -
Read_colliding_hashes_different_lengths 0.8284 ns 0.0102 ns 0.0095 ns - 660 B -

After pointer and 2 times bigger Root

Method Mean Error StdDev Gen0 Code Size Allocated
Read_from_big_dict 143,440.3209 ns 2,785.0180 ns 3,420.2525 ns - 343 B -
Enumerate_big_dict 41,784.9841 ns 742.0425 ns 694.1071 ns - 133 B -
Read_missing_with_hash_collisions 162,168.6432 ns 3,115.8957 ns 3,060.2262 ns - 349 B -
Read_missing_with_no_hash_collisions 126,322.7669 ns 2,015.2744 ns 1,885.0889 ns - 381 B -
Read_write_small 3,009.3006 ns 35.7414 ns 33.4325 ns 1,301 B -
Read_colliding_hashes_different_lengths 0.7309 ns 0.0155 ns 0.0145 ns - 590 B -

@Scooletz Scooletz linked an issue Dec 19, 2024 that may be closed by this pull request
Copy link

github-actions bot commented Jan 7, 2025

Code Coverage

Package Line Rate Branch Rate Health
Paprika 80% 76%
Summary 80% (5049 / 6286) 76% (1748 / 2294)

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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PooledSpanDictionary improvements
1 participant