KEMBAR78
[mypyc] Add primitives for list, str and tuple slicing by JukkaL · Pull Request #9283 · python/mypy · GitHub
Skip to content

Conversation

JukkaL
Copy link
Collaborator

@JukkaL JukkaL commented Aug 9, 2020

This speeds up some microbenchmarks from 40% (list) to 100% (str)
when I run them on Ubuntu 20.04.

Non-default strides aren't optimized, since they are fairly rare.

a[::-1] for lists might be worth special casing in the future. Also, once
we have primitives for bytes, it should also be special cased.

Fixes mypyc/mypyc#725.

@JukkaL JukkaL merged commit 765acca into master Sep 27, 2020
@JukkaL JukkaL deleted the mypyc-list-slice branch September 27, 2020 10:03
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.

Faster slicing

1 participant