This is more of an observation than a concrete issue, but it looks like memoizing keyword and providing it as a decode-key-fn give better throughput than the default keyword deserializer.
I tried several approaches, a concurrent hash map, thread local hash map, and Ben Mane's Caffeine cache, all give better performance. The best implementation wasn't immediately evident between them.
Still, this could be an optimization worth examining.
The big difference in CPU utilization was in clojure.lang.Keyword/intern being significantly slower than just a regular lookup.
This is more of an observation than a concrete issue, but it looks like memoizing
keyword
and providing it as adecode-key-fn
give better throughput than the default keyword deserializer. I tried several approaches, a concurrent hash map, thread local hash map, and Ben Mane's Caffeine cache, all give better performance. The best implementation wasn't immediately evident between them. Still, this could be an optimization worth examining. The big difference in CPU utilization was inclojure.lang.Keyword/intern
being significantly slower than just a regular lookup.