Skip to content

Keyword deserializer slower than custom cache #56

Open
@bsless

Description

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.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions