Welcome! Please see the About page for a little more info on how this works.

0 votes
in ClojureScript by

Entering a set literal in the REPL with more than 8 elements should create a PHM backed set but instead it is array backed.

Example (in REPL):
cljs.user=> (type (.-hash-map #{1 2 3 4 5 6 7 8 9}))
cljs.core/PersistentArrayMap

This means operations such as get and contains? end up doing long scans and are slower than a user would expect.

1 Answer

0 votes
by
Reference: https://clojure.atlassian.net/browse/CLJS-1766 (reported by tmulvaney)
...