Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Merged
JukkaL merged 21 commits into
masterfrom
mypyc-list-slice
Sep 27, 2020
Merged

[mypyc] Add primitives for list, str and tuple slicing#9283
JukkaL merged 21 commits into
masterfrom
mypyc-list-slice

Conversation

@JukkaL

@JukkaL JukkaL commented Aug 9, 2020

Copy link
Copy Markdown
Collaborator

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