Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mypyc] Add primitives for list, str and tuple slicing #9283

Merged
merged 21 commits into from Sep 27, 2020
Merged

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