KEMBAR78
[mypyc] Add primitive for bytes slicing by 97littleleaf11 · Pull Request #10966 · python/mypy · GitHub
Skip to content

Conversation

97littleleaf11
Copy link
Collaborator

Description

Add a C helper function for bytes and bytearray slicing.

Test Plan

  • Run tests for both bytes and bytearray with return type checks.
  • IR build test for C helper func.

@97littleleaf11
Copy link
Collaborator Author

Implements part of mypyc/mypyc#880

Copy link
Collaborator

@JukkaL JukkaL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Looks good -- I measured over 2x improvement in the bytes_slicing microbenchmark. I just have a few ideas about more test cases.

Copy link
Collaborator

@JukkaL JukkaL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This is ready to merge after the builds are green.

@JukkaL JukkaL merged commit 6444968 into python:master Aug 12, 2021
@97littleleaf11 97littleleaf11 deleted the bytes-slicing branch October 14, 2021 16:12
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.

2 participants