Skip to main content
Version: v1.2

HasherBenchmarks

A contract used to benchmark the poseidon hash function

hash5Benchmark

function hash5Benchmark(uint256[5] array) public pure returns (uint256 result)

Benchmark the poseidon hash function with 5 inputs

Parameters

NameTypeDescription
arrayuint256[5]The array of inputs to hash

Return Values

NameTypeDescription
resultuint256The hash of the inputs

hashLeftRightBenchmark

function hashLeftRightBenchmark(uint256 _left, uint256 _right) public pure returns (uint256 result)

Benchmark the poseidon hash function with 2 inputs

Parameters

NameTypeDescription
_leftuint256The left input to hash
_rightuint256The right input to hash

Return Values

NameTypeDescription
resultuint256The hash of the two inputs