akhudek / fast-zip

fast-zip
85 stars 16 forks source link

2x speedup via deftype impl #10

Closed postspectacular closed 9 years ago

postspectacular commented 9 years ago

I've been using your great lib for some genetic programming using v. deep ASTs and wanted to see if I can tickle some more performance out to reduce my massive waiting times. So I switched ZipperPath & ZipperLocation to deftype and made a few other minor tweaks with an overall 2x speedup! Hope you like :)

Also, I updated the field accessors to be CLJS compatible therefore pretty much removing the need for two codebases (but so far have only touched the CLJ version). My next step will be to move my fork to a CLJX setup. Didn't want to do this all in one PR and also don't know if you'd be up for that switch (shouldn't have any bad implications though).

Benchmarks are updated to (in readme) and added to benchmarks.md...

postspectacular commented 9 years ago

Hmmm... I just committed the CLJX refactoring, but hoped I could put this in a separate PR, however GH decided to include this in this one as well (bit annoying & sorry!).

However, the new CLJS version is on my machine also 2x as fast than the 0.5.2 version and I hope you'll support CLJX. Thanks!

akhudek commented 9 years ago

Hey, this looks great. I'll take a closer look tomorrow and try to get it merged in soon.

postspectacular commented 9 years ago

Woohoo! :) Thanks for this, are you by any chance prepping a new release soon as well?

postspectacular commented 9 years ago

Ignore my last comment, just saw you already did :)

akhudek commented 9 years ago

I should thank you for this great update. :-)

akhudek commented 9 years ago

Also, feel free to make an update announcement on the clojure list if you'd like.