Skip to content

Use smartstring for name of field (#819). #899

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

Merged
merged 2 commits into from
Mar 30, 2021

Conversation

andrisak
Copy link
Contributor

Replaced name of field with a smartstring instead of String. Running cargo bench --features expose-test-schema indicates a slight improvement on the query_type_name test and slightly lower performance on the introspection_query test. Here is an example of two runs:

Master:
test introspection_query ... bench: 962,848 ns/iter (+/- 70,973)
test query_type_name ... bench: 11,557 ns/iter (+/- 894)

This PR/branch:
test introspection_query ... bench: 978,076 ns/iter (+/- 70,523)
test query_type_name ... bench: 11,354 ns/iter (+/- 1,471)

Copy link
Member

@LegNeato LegNeato left a comment

Choose a reason for hiding this comment

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

Thank you!

@LegNeato LegNeato merged commit 0de6317 into graphql-rust:master Mar 30, 2021
@LegNeato
Copy link
Member

LegNeato commented Apr 4, 2021

This is now on crates.io. Thank you again!

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