xsc / pandect

Fast and easy-to-use Message Digest, Checksum and HMAC library for Clojure
https://cljdoc.org/d/pandect/pandect/CURRENT
MIT License
222 stars 11 forks source link

Replace count With alength for Performance Reasons #13

Closed alexanderkiel closed 9 years ago

alexanderkiel commented 9 years ago

count is quite slow on arrays because it works on many types which are checked in a long chain of if statements where arrays come last.

I get a improvement of MD5 Hello World Hashing from 750 ns to 630 ns.

xsc commented 9 years ago

Thanks! Even if there were no performance improvement at all this would be the right thing to use there.

xsc commented 9 years ago

Artifact Coordinates

[pandect "0.5.3"]