We're updating the issue view to help you get more done. 

(object-array [1]) is ~3x slower than (object-array (rseq [1]))

Description

{{user=> (time (dotimes [_ 10000000] (object-array [1])))
"Elapsed time: 1178.116257 msecs"
nil
user=> (time (dotimes [_ 10000000] (object-array (rseq [1]))))
"Elapsed time: 422.42248 msecs"
nil}}

This appears to be because PersistentVector$ChunkedSeq does not implement Counted, so RT.count is iterating the ChunkedSeq to get its count.

Environment

None

Status

Assignee

Unassigned

Reporter

Paul Stadig

Labels

Approval

Ok

Patch

Code and Test

Fix versions

Affects versions

Release 1.4

Priority

Minor