Skip to content

perf: use faster hashing function for hashmaps (ahash)#393

Merged
dd-oleksii merged 1 commit intomainfrom
oleksii/jj-povkwmxrkpso
Jan 7, 2026
Merged

perf: use faster hashing function for hashmaps (ahash)#393
dd-oleksii merged 1 commit intomainfrom
oleksii/jj-povkwmxrkpso

Conversation

@dd-oleksii
Copy link
Collaborator

Description

Use ahash for hashmaps.

Depending on the feature flag configuration, ahash boosts performance by 5–30% in both flag and bandit benchmarks.

This PR enables it for python and ruby SDKs. Deferring update of rust sdk as it would break the public API and require a major bump.

How has this been documented?

Changelogs.

How has this been tested?

Existing tests and benchmarks.

@changeset-bot
Copy link

changeset-bot bot commented Jan 5, 2026

🦋 Changeset detected

Latest commit: b326a38

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
eppo_core Minor
python-sdk Patch
ruby-sdk Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@dd-oleksii dd-oleksii changed the title perf: add ahash option to use faster hashing for hashmaps perf: use faster hashing function for hashmaps (ahash) Jan 5, 2026
@dd-oleksii dd-oleksii force-pushed the oleksii/jj-povkwmxrkpso branch from 437326d to c9871bb Compare January 5, 2026 15:32
@dd-oleksii dd-oleksii force-pushed the oleksii/jj-povkwmxrkpso branch from c9871bb to b326a38 Compare January 5, 2026 15:47
@dd-oleksii
Copy link
Collaborator Author

re test failure: it looks like SDK fetched&parsed configuration faster than python called the next function 😅

    @pytest.mark.rust_only
    def test_configuration_none():
        client = init("ufc", wait_for_init=False)
        configuration = client.get_configuration()
>       assert configuration == None
E       assert <eppo_client.Configuration object at 0x10bf4f4d0> == None

Copy link

@aarsilv aarsilv left a comment

Choose a reason for hiding this comment

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

ahash looks cool! 💪

Comment on lines +13 to +14
# Use ahash for HashMaps. This is currently disabled by default to
# allow SDKs adapt their usage one by one.
Copy link

Choose a reason for hiding this comment

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

Nice thinking

@dd-oleksii dd-oleksii merged commit 21b48a2 into main Jan 7, 2026
83 of 97 checks passed
@dd-oleksii dd-oleksii deleted the oleksii/jj-povkwmxrkpso branch January 7, 2026 09:37
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

Comments