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 attribute values AnyHashable #28

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

Conversation

robb
Copy link
Owner

@robb robb commented Jun 26, 2021

This makes it easier to use nodes with custom attribute values without having to convert to and from String.

Unwrapping the base value and checking the type manually has overhead but it seems bearable.

Before (ebe61c2):

name               time          std        iterations
------------------------------------------------------
Build a basic page 211250.000 ns ±   2.32 %       6397

After:

name               time          std        iterations
------------------------------------------------------
Build a basic page 234208.000 ns ±   2.29 %       5850

(Not checking against String or TextOutputStreamable performs worse still).

@robb robb mentioned this pull request Jun 28, 2021
@robb robb mentioned this pull request May 3, 2022
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.

1 participant