Skip to content

feat: improved bit_rotl64 implementation for keccakf benchmark(s) #1829

@DavePearce

Description

@DavePearce

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)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    perfzkcIssues related to ZkC language

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions