Placeholder for unrolled small maps enhancement (companion for vectors at CLJ-1517).
Is there an expectation that these would perform better that PersistentArrayMap?
Yes, in some cases significantly so, for three reasons (in rough order of importance):
positional constructors, without any need for array instantiation/population
short-circuiting equality checks using hash comparisons
no iteration on any operation
There are a series of benchmarks at https://github.com/ztellman/cambrian-collections/blob/master/test/cambrian_collections/map_test.clj#L64-L148, which compare operations against maps with both keywords (which don't benefit from the hash comparisons) and symbols (which do). The 7-entry map cases cause the unrolled maps to overflow, so they only exist to test the overflow mechanism.
I've run the benchmark suite on my laptop, and the results are at https://gist.github.com/ztellman/961001e1a77e4f76ee1d. Some notable results:
non-keyword lookups on 5-element maps are 2x faster (hash checks): https://gist.github.com/ztellman/961001e1a77e4f76ee1d#file-gistfile1-txt-L169-L191
creation for 1-element maps is 7-10x faster, and for 3-element maps is 4-8x faster (positional constructors): https://gist.github.com/ztellman/961001e1a77e4f76ee1d#file-gistfile1-txt-L2178-L2307
creation of 5-element maps via `into` is 1.5x-2.5x faster: https://gist.github.com/ztellman/961001e1a77e4f76ee1d#file-gistfile1-txt-L1673-L1719
The rest of the benchmarks are marginally faster due to unrolling, but most of the performance benefits are from the above behaviors. In a less synthetic benchmark, I found that Cheshire JSON decoding (which is 33% JSON lexing and 66% data structure building) was sped up roughly 30-40%.