Summary
The various keccakf benchmarks use an implementation of bit_rotl64 which is suboptimal in terms of the number of ZkC instructions executed. Therefore, this issue should replace that implementation.
Approach
This is an improved implementation:
fn bit_rotl64(value:u64, n:u6) -> (res:u64) {
var shift:u7 = 64 - (n as u7)
res = (value << n) | (value >> shift)
}
Summary
The various
keccakfbenchmarks use an implementation ofbit_rotl64which is suboptimal in terms of the number of ZkC instructions executed. Therefore, this issue should replace that implementation.Approach
This is an improved implementation: