Skip to content

Conversation

@giladchase
Copy link
Contributor

Faster than current approach, which uses at.

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

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

@orizi reviewed all commit messages.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @TomerStarkware)


corelib/src/byte_array.cairo line 570 at r1 (raw file):

impl ByteArrayIterator of crate::iter::Iterator<ByteArrayIter> {
    type Item = u8;
    #[inline]

no need.
let the system do that.

Code quote:

    #[inline]

@giladchase giladchase force-pushed the gilad/10-16-feat_byte_array_add_bytespan_iterator branch from 218a5bd to 96b6e7e Compare October 19, 2025 12:36
@giladchase giladchase force-pushed the gilad/10-19-refactor_byte_array_delegate_bytearray_iterator_into_bytespan_iterator branch from deb73a5 to dcda500 Compare October 19, 2025 12:36
@giladchase giladchase force-pushed the gilad/10-16-feat_byte_array_add_bytespan_iterator branch from 96b6e7e to 7e50300 Compare October 19, 2025 12:56
@giladchase giladchase force-pushed the gilad/10-19-refactor_byte_array_delegate_bytearray_iterator_into_bytespan_iterator branch from dcda500 to 6553b56 Compare October 19, 2025 12:56
Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

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

@orizi reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @giladchase and @TomerStarkware)

@giladchase giladchase force-pushed the gilad/10-16-feat_byte_array_add_bytespan_iterator branch from 7e50300 to d32b608 Compare October 19, 2025 13:06
@giladchase giladchase force-pushed the gilad/10-19-refactor_byte_array_delegate_bytearray_iterator_into_bytespan_iterator branch from 6553b56 to 79f18d7 Compare October 19, 2025 13:06
Copy link
Contributor Author

@giladchase giladchase left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @orizi and @TomerStarkware)


corelib/src/byte_array.cairo line 570 at r1 (raw file):

Previously, orizi wrote…

no need.
let the system do that.

It doesn't inline it :(
When I remove #[inline] test_into_iterator goes up by ~20K gas

Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @TomerStarkware)

Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @TomerStarkware)

@giladchase giladchase force-pushed the gilad/10-19-refactor_byte_array_delegate_bytearray_iterator_into_bytespan_iterator branch from 79f18d7 to d4f496d Compare October 20, 2025 06:23
@giladchase giladchase force-pushed the gilad/10-16-feat_byte_array_add_bytespan_iterator branch 2 times, most recently from 7e3b9ef to 727b961 Compare October 20, 2025 07:19
@giladchase giladchase force-pushed the gilad/10-19-refactor_byte_array_delegate_bytearray_iterator_into_bytespan_iterator branch from d4f496d to 3554509 Compare October 20, 2025 07:19
Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

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

@orizi reviewed 1 of 1 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @TomerStarkware)

@giladchase giladchase force-pushed the gilad/10-19-refactor_byte_array_delegate_bytearray_iterator_into_bytespan_iterator branch from 3554509 to 94c3906 Compare October 20, 2025 08:16
@giladchase giladchase force-pushed the gilad/10-16-feat_byte_array_add_bytespan_iterator branch from 727b961 to 15d5c7d Compare October 20, 2025 08:16
@giladchase giladchase force-pushed the gilad/10-19-refactor_byte_array_delegate_bytearray_iterator_into_bytespan_iterator branch from 94c3906 to fbc4b9c Compare October 20, 2025 09:28
@giladchase giladchase force-pushed the gilad/10-16-feat_byte_array_add_bytespan_iterator branch 2 times, most recently from 8ae9468 to def6613 Compare October 20, 2025 12:09
@giladchase giladchase force-pushed the gilad/10-19-refactor_byte_array_delegate_bytearray_iterator_into_bytespan_iterator branch from fbc4b9c to cf82b89 Compare October 20, 2025 12:09
@giladchase giladchase force-pushed the gilad/10-19-refactor_byte_array_delegate_bytearray_iterator_into_bytespan_iterator branch 2 times, most recently from 9b4cccf to 3e918e0 Compare October 22, 2025 09:51
@giladchase giladchase force-pushed the gilad/10-16-feat_byte_array_add_bytespan_iterator branch from 5c79087 to d71857a Compare October 22, 2025 09:51
Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

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

@orizi reviewed 1 of 1 files at r10, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @TomerStarkware)

@giladchase giladchase force-pushed the gilad/10-16-feat_byte_array_add_bytespan_iterator branch from d71857a to c79bbee Compare October 22, 2025 10:01
@giladchase giladchase force-pushed the gilad/10-19-refactor_byte_array_delegate_bytearray_iterator_into_bytespan_iterator branch 2 times, most recently from 5f4028f to 22eb588 Compare October 22, 2025 10:03
@giladchase giladchase force-pushed the gilad/10-16-feat_byte_array_add_bytespan_iterator branch 2 times, most recently from e11d736 to b66e573 Compare October 22, 2025 10:05
@giladchase giladchase force-pushed the gilad/10-19-refactor_byte_array_delegate_bytearray_iterator_into_bytespan_iterator branch from 22eb588 to 3b51301 Compare October 22, 2025 10:05
Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

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

@orizi reviewed 1 of 1 files at r11, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @TomerStarkware)

@giladchase giladchase force-pushed the gilad/10-16-feat_byte_array_add_bytespan_iterator branch from b66e573 to b74fbe0 Compare October 22, 2025 10:10
@giladchase giladchase force-pushed the gilad/10-19-refactor_byte_array_delegate_bytearray_iterator_into_bytespan_iterator branch from 3b51301 to 6c77242 Compare October 22, 2025 10:10
@giladchase giladchase force-pushed the gilad/10-16-feat_byte_array_add_bytespan_iterator branch from b74fbe0 to 0eb401e Compare October 22, 2025 10:20
@giladchase giladchase force-pushed the gilad/10-19-refactor_byte_array_delegate_bytearray_iterator_into_bytespan_iterator branch from 6c77242 to 0a4841e Compare October 22, 2025 10:20
Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

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

@orizi reviewed 1 of 1 files at r12, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @TomerStarkware)

@giladchase giladchase force-pushed the gilad/10-19-refactor_byte_array_delegate_bytearray_iterator_into_bytespan_iterator branch from 0a4841e to 80c1437 Compare October 22, 2025 11:06
@giladchase giladchase force-pushed the gilad/10-16-feat_byte_array_add_bytespan_iterator branch from 0eb401e to afeac4a Compare October 22, 2025 11:06
Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

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

@orizi reviewed 1 of 1 files at r13, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @TomerStarkware)

@giladchase giladchase force-pushed the gilad/10-16-feat_byte_array_add_bytespan_iterator branch from afeac4a to 459d8cb Compare October 22, 2025 11:37
@giladchase giladchase force-pushed the gilad/10-19-refactor_byte_array_delegate_bytearray_iterator_into_bytespan_iterator branch from 80c1437 to 03b3602 Compare October 22, 2025 11:37
Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

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

@orizi reviewed 1 of 1 files at r14, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @TomerStarkware)

@giladchase giladchase changed the base branch from gilad/10-16-feat_byte_array_add_bytespan_iterator to main October 22, 2025 11:54
@giladchase giladchase force-pushed the gilad/10-19-refactor_byte_array_delegate_bytearray_iterator_into_bytespan_iterator branch from 03b3602 to d3f0247 Compare October 22, 2025 11:55
@graphite-app
Copy link

graphite-app bot commented Oct 22, 2025

Merge activity

  • Oct 22, 11:55 AM UTC: Graphite rebased this pull request, because this pull request is set to merge when ready.

@giladchase giladchase added this pull request to the merge queue Oct 22, 2025
Merged via the queue into main with commit 0d59aa2 Oct 22, 2025
54 checks passed
@orizi orizi deleted the gilad/10-19-refactor_byte_array_delegate_bytearray_iterator_into_bytespan_iterator branch October 23, 2025 08:30
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.

4 participants