fosskers / scalaz-and-cats

Usage examples and benchmarks between Scalaz and Cats (w/ Haskell ground-truth).
489 stars 28 forks source link

optimising scalaz.Show[String] #5

Closed fommil closed 6 years ago

fommil commented 6 years ago

the evidence behind claims in https://github.com/scalaz/scalaz/pull/1549#issuecomment-349104185

fommil commented 6 years ago

btw, I do not think the comparison to stdlib or cats is fair in this example... they are printing raw strings whereas scalaz is wrapping the string in quotes, making it possible to copy/paste back from the REPL, etc, and allowing for roundtripping via source code.

fosskers commented 6 years ago

I should add a note to the README about how the comparison isn't quite apples-to-apples. The same goes for the Eq[List] comparisons too, since that's List vs IList. Is there any reason why your IList improvements can't be ported to List too?

fommil commented 6 years ago

Maybe they can, but I'd rather optimise the preferred data structures rather than give people reasons not to switch.

fosskers commented 6 years ago

Fair.

fosskers commented 6 years ago

This has been taken care of in the latest Scalaz 7.2 versions.