Skip to content

neonlabsorg/alt-bn128-bench

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Alt BN 128 Benchmark

About

We need to know, how much BPF instructions will be used for every operation on elliptic curves. We can't to know it directly, but we can compare the time needed for these operations and time, needed for Keccak hash for the same data. These benchmarks allow us to approximately define the amount of data in bytes for ellicptic curves operations and Keccak hash and compare result times.

(back to top)

Results

Operation like Keccak Hash of
Addition ~400 bytes
Multiplication ~12'000 bytes
Pairing ~140'000 bytes

(back to top)

Detailed results

Addition

Operation Rounds Size Pure K-ratio K-ratio

Multiplication

Operation Rounds Size Pure K-ratio K-ratio

Pairing

Operation Rounds Size Pure K-ratio K-ratio

(back to top)

Example of Usage

Starting 1000 rounds of ALL benchmarks on the random data of 256 bytes:

alt-bn128-bench --count 1000 --size 256

Same as above, but in short notaion:

alt-bn128-bench -c 1000 -s 256

Start only specific benchmark with default values:

# Start Addition benchmark
alt-bn128-bench add

# Start Multiplication benchmark
alt-bn128-bench mul

# Start Pairing benchmark
alt-bn128-bench pair

Starting 1000 rounds of Addition benchmark on the random data of 256 bytes:

alt-bn128-bench --count 1000 --size 256 add

(back to top)

Arguments List

CLI arg Short Req Type Default Example Description
--count -c No usize 10000 -c 500 Number of rounds
--size -s No usize 10000 -s 256 Size of random input buffer in bytes
add / mul / pair No Bench - add We can specify the benchmarks to execute. If field is not set, all benchmarks will be processed.

(back to top)

Roadmap

See the open issues for a full list of proposed features (and known issues).

(back to top)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages