taoensso / nippy

The fastest serialization library for Clojure
https://www.taoensso.com/nippy
Eclipse Public License 1.0
1.04k stars 60 forks source link

Remove unnecessary runtime 'if' in extend-freeze macro. #104

Closed scramjet closed 6 years ago

scramjet commented 6 years ago

Hello. A small optimisation: I just noticed the extend-freeze macro has an if checking whether the type ID is a keyword or not. Since this is constant at run time, I've changed the macro to emit the result of the if, rather than check the type ID on every call.

ptaoussanis commented 6 years ago

Hi Matthew, good catch and thanks for the PR- merged manually!

scramjet commented 6 years ago

No worries!