Closed Janiczek closed 2 years ago
Thanks for looking into this. Sorry for the delay, but I will check out this PR ASAP (later today or tomorrow).
I just benchmarked this here: https://ellie-app.com/gm9X8yfPLXMa1 (with a one small adjustment: I pulled go
out into a top level function). There seems to be a performance drop primarily on small lists and small group sizes.
(Ignore the fact that its labelled "isPermutationOf". Thats because I copy and pasted the "isPermutationOf" benchmark to get started).
Is it worth it? Probably. But what do you all think?
Is it worth it?
I'd consider it worth it, as correctness issues IMHO should have more priority than performance issues
I agree with @Janiczek, correctness is more important than performance (at least as a generally available function like this). In a way, it's good that it's slower mostly for the small inputs because performance increases for those don't matter too much in the big picture anyway (I mean, you can still call this function 2 million times per second apparently!).
Sounds good to me. Thanks @Janiczek !
Closes #75
I've hit this during Advent of Code 😠😄