Closed RokasBalevicius closed 6 months ago
@shannonklaus is there any timeline for comments and/or merge?
@RokasBalevicius Yes, I am looking over this PR this week
@RokasBalevicius Thank you for your pull request. It will be included in my next release, which will be mid June.
Main change: Ripemd160 hash calculator can be a struct as it is used only in one place and its instance is essentially ephemeral. No need to allocate it on heap.
Benchmark results:
Benchmark code:
I used 10k keys, because we have use cases where we need to prepare thousands of keys in single request, so I just lazily took benchmarks I already had. Single key benchmark should show similar levels of improvement in allocations (a byte saved is a byte earned).
Key2 -> is copy of existing Key class, but uses the struct ValueRipemd160 instead of the class one to calculate the digest.
Secondary changes: I'm working on Mac using Rider, I noticed that such a setup is not readily supported by this project. I made some changes to make life easier for non windows developers. Namely added Rider related stuff to .gitignore and added build configs which do not build Windows specific projects.
I added all changes into single PR, because it felt like it will be quicker.