Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keyword deserializer slower than custom cache #56

Open
bsless opened this issue Jun 19, 2021 · 0 comments
Open

Keyword deserializer slower than custom cache #56

bsless opened this issue Jun 19, 2021 · 0 comments

Comments

@bsless
Copy link
Contributor

bsless commented Jun 19, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant