KEMBAR78
[mypyc] Intern string literals by JukkaL · Pull Request #9960 · python/mypy · GitHub
Skip to content

Conversation

@JukkaL
Copy link
Collaborator

@JukkaL JukkaL commented Jan 24, 2021

This makes us more compatible with CPython, which interns (some)
string literals.

This speeds up some microbenchmarks slightly, by around 0.5-2%.

This may give a bigger speed win when calling functions using
vectorcalls and keyword arguments, but we'll see about that once that's
supported. Vectorcall argument parsing code has a fast path for interned
keyword argument names.

@JukkaL JukkaL merged commit 9e1324d into master Jan 24, 2021
@JukkaL JukkaL deleted the str-intern branch January 24, 2021 16:44
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