sedaprotocol / vrf-rs

MIT License
0 stars 1 forks source link

♻️ Optimize code by benefiting from known sized arrays #3

Open mariocao opened 1 year ago

mariocao commented 1 year ago

♻️ Refactor

Current implementation uses vectors when arrays with fixed size could have been used.

Motivation

Avoiding unnecessary allocations will increase performance.

Implementation

Use the type GenericArray<u8, <Self::Curve as Curve>::FieldBytesSize> instead of Vec<u8>.