mikeizbicki / subhask

Type safe interface for working in subcategories of Hask
BSD 3-Clause "New" or "Revised" License
418 stars 43 forks source link

distanceUB still follows the rules but returns other uppers. Uses sqrt only if needed #59

Closed Drezil closed 8 years ago

Drezil commented 8 years ago

Same request as the other one, but on master-branch

mikeizbicki commented 8 years ago

I think you've accidentally added a vim binary file into the commit. That's why I reverted the pull request.

Also, have you actually done the experiments to measure if this is faster? I remember being surprised that on my system with ghc 7.10 having sqrt on the outside was actually faster. I assume this is related to some deep branch prediction issue with the llvm optimizer. I could easily believe that with the newer version of ghc and llvm that this isn't the case any longer though.