Use smartstring for name of field (#819). #899
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Replaced name of field with a
smartstring
instead ofString
. Runningcargo bench --features expose-test-schema
indicates a slight improvement on thequery_type_name
test and slightly lower performance on theintrospection_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)