totomanov / sortnet

Gas-optimized sorting networks in Solidity.
MIT License
13 stars 1 forks source link

Optimized networks #1

Open bertdobbelaere opened 1 month ago

bertdobbelaere commented 1 month ago

Hi, thanks for using my networks as reference for this project. I just wanted to notify you of two pages I recently created: https://bertdobbelaere.github.io/sorting_networks_avgswaps.html and https://bertdobbelaere.github.io/sorting_networks_maxswaps.html. These are networks that match the same number of elements as the ones on the main list, but have been optimized to reduce the effectively executed number of swaps, either on average or worst case. For the sortnet case, this would mean that the "cas" function would be called the same number of times, but the if condition inside would be false more often.

totomanov commented 1 month ago

Thanks for letting me know! Your SorterHunter is really inspiring.