Set literals in REPL end up reified as ArrayMap backed PersistentHashSets.

Description

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.

Environment

None

Activity

Show:

Details

Assignee

Reporter

Labels

Priority

Created August 28, 2016 at 12:35 PM
Updated August 28, 2016 at 12:35 PM