-
Notifications
You must be signed in to change notification settings - Fork 52
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.
AlexWaygood, hugovk, eendebakpt, Eclips4, scastlara and 11 more
Metadata
Metadata
Assignees
Labels
No labels