Open
Description
People keep discovering that, embarrassingly, checking whether a string starts with a given substring is slower with s.startswith("foo")
than with s[:3] == "foo"
. The reason is that startswith
requires a name lookup. I think we now have the machinery to special-case selected built-in method in the specializer? This would be a good candidate.
Metadata
Metadata
Assignees
Labels
No labels