cairo-vm icon indicating copy to clipboard operation
cairo-vm copied to clipboard

Possible performance improvements in keccak related hints

Open entropidelic opened this issue 3 years ago • 0 comments

  • value in compare_bytes_in_word_nondet:
This works fine, but it should be checked for a performance improvement.
One option is to try to convert n_bytes into usize, with failure to do so simply
making value be 0 (if it can't convert then it's either negative, which can't be in Cairo memory
or too big, which also means n_bytes > BYTES_IN_WORD). The other option is to exctract
bigint!(BYTES_INTO_WORD) into a lazy_static!
  • value in compare_keccak_full_rate_in_bytes_nondet: same comment as before.
  • padding in cairo_keccak_finalize
  • passing bigint_values as an iterator instead of a vector in u64_array_to_bigint_vec helper function

entropidelic avatar Aug 08 '22 16:08 entropidelic