Open nilern opened 2 years ago
Thanks for the PR! Certainly happy to accept optimizations but always prefer if they come with measurements. And would like to learn more about the choice of reduce
over doseq
.
I want to do some benchmarks but for now I am out of time.
Thanks! I just want to make sure we are striking the right balance between performance and clarity, i.e. only making optimizations that make a measurable difference. My intuition is admittedly stale here, so I'm happy to take these with measurements, or happy if another maintainer wants to take them without.
I don't think this adds much complexity; it is just using JS arrays just like it was already using ArrayList
on the JVM.
While I am fairly confident it will also be faster it would be silly to optimize without benchmarking.
doseq
withreduce
on JVMThe latter could improve #356 substantially; in the Malli seqex impl I had a similar situation with a persistent set in an atom on cljs and it was just unacceptably slow.