Skip to content

[mypyc] Add primitive for bytes slicing #10966

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

Merged
merged 6 commits into from
Aug 12, 2021

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