-
Notifications
You must be signed in to change notification settings - Fork 18
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
feat: add iterator-based for loops #1176
Conversation
This comment has been minimized.
This comment has been minimized.
a8c0bcc
to
165c11c
Compare
6d8afc2
to
f69afb5
Compare
This comment has been minimized.
This comment has been minimized.
1f9f911
to
b242cd7
Compare
This comment has been minimized.
This comment has been minimized.
b242cd7
to
e6b8852
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
24c5898
to
f92aea1
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
62c5f64
to
7d8670b
Compare
@@ -78,10 +78,9 @@ impl<C: Config, V: MemVariable<C>> Array<C, V> { | |||
} | |||
} | |||
Self::Dyn(ptr, len) => { | |||
assert_eq!(V::size_of(), 1, "only support variables of size 1"); |
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.
I'm not sure why this restriction was previously present, as it seems easily removed on L83 below.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
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.
lgtm
This comment has been minimized.
This comment has been minimized.
debug_info.clone(), | ||
); | ||
} | ||
}; |
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.
Small optimization: We can put the Bne
after the first AddFI
so that we don't spend cycles incrementing pointers we don't need to use.
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.
I think we need the first Bne
to cover the case where starts[0] == end0
.
This comment has been minimized.
This comment has been minimized.
Commit: 4a1d614 |
* chore: clean up comments in native compiler * feat: add iterator for loop * feat: convert more for loops * fix: lint * wip: zipped iterator * fix: lint * feat: iterator for loop in poseidon * feat: optimize store * fix: keep loop variable * fix: store * opt: try removing get_ref * opt: remove duplicate get * opt: remove idx * chore: remove unused code * fix: lint * feat: add ZipFor and zipped_iter * fix: lint * feat: implement zipped_iter * fix: faulty assert * fix: read * fix: lint * fix: lint * fix: vec * feat: add more zipped_iter * feat: optimize verify_batch * fix: use first array for zipped_iter * feat: add zipped_iter to hint * chore: remove print * feat: optimize hint_words * fix: lifetime issues * chore: add comment with example * feat: use square-and-multiply for exp_reverse_bits_len * fix: input size for exp_reverse_bits_len * fix: slice and shift for V::size_of() greater than 1, optimization * fix: replace incorrectly removed side effect * feat: optimize adds * feat: optimize for loops in duplex challenger * chore: use larger runner for build workflow * feat: address comments * feat: remove all but the first end ptr in ZipFor * feat: implement and use compile_zip! macro * feat: add tests for iter and zip
Closes INT-2930, INT-2946