-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
[stdlib] Optimize _StringSliceIter
to not have branching in forward iteration
#3546
Conversation
Signed-off-by: martinvuyk <[email protected]>
Signed-off-by: martinvuyk <[email protected]>
Signed-off-by: martinvuyk <[email protected]>
Signed-off-by: martinvuyk <[email protected]>
Signed-off-by: martinvuyk <[email protected]>
Signed-off-by: martinvuyk <[email protected]>
Signed-off-by: martinvuyk <[email protected]>
Signed-off-by: martinvuyk <[email protected]>
Signed-off-by: martinvuyk <[email protected]>
Signed-off-by: martinvuyk <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the part about
This also fixes an error in the iterator's len logic which assumed it would be called only at the beginning of the iteration
Can we add a unit test case that gets fixed as a result of your changes?
Signed-off-by: martinvuyk <[email protected]>
Signed-off-by: martinvuyk <[email protected]>
!sync |
✅🟣 This contribution has been merged 🟣✅ Your pull request has been merged to the internal upstream Mojo sources. It will be reflected here in the Mojo repository on the nightly branch during the next Mojo nightly release, typically within the next 24-48 hours. We use Copybara to merge external contributions, click here to learn more. |
… in forward iteration (#51441) [External] [stdlib] Optimize `_StringSliceIter` to not have branching in forward iteration Optimize `_StringSliceIter` to not have branching in forward iteration. This also fixes an error in the iterator's `__len__` logic which assumed it would be called only at the beginning of the iteration Co-authored-by: martinvuyk <[email protected]> Closes #3546 MODULAR_ORIG_COMMIT_REV_ID: 0919af33312b082a4bac7d1547a193fba378e56f
Landed in 57f4962! Thank you for your contribution 🎉 |
… in forward iteration (#51441) [External] [stdlib] Optimize `_StringSliceIter` to not have branching in forward iteration Optimize `_StringSliceIter` to not have branching in forward iteration. This also fixes an error in the iterator's `__len__` logic which assumed it would be called only at the beginning of the iteration Co-authored-by: martinvuyk <[email protected]> Closes #3546 MODULAR_ORIG_COMMIT_REV_ID: 0919af33312b082a4bac7d1547a193fba378e56f
Optimize
_StringSliceIter
to not have branching in forward iteration.This also fixes an error in the iterator's
__len__
logic which assumed it would be called only at the beginning of the iteration