Open mariocao opened 1 year ago
Current implementation uses vectors when arrays with fixed size could have been used.
Avoiding unnecessary allocations will increase performance.
Use the type GenericArray<u8, <Self::Curve as Curve>::FieldBytesSize> instead of Vec<u8>.
GenericArray<u8, <Self::Curve as Curve>::FieldBytesSize>
Vec<u8>
♻️ 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 ofVec<u8>
.