Clojure

reduce on primitive arrays doesn't use ArraySeq_TYPE.reduce

Details

  • Type: Enhancement Enhancement
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: Release 1.9
  • Fix Version/s: None
  • Component/s: None
  • Labels:

Description

Currently a reduce on (e.g.) long-array never ends up in the fast ArraySeq_Long.reduce function. Only if the user calls seq on it beforehand.

So:

;; Fast:
(reduce (fn [_ _]) 0 (seq (long-array [1])))
;; >2x slower:
(reduce (fn [_ _]) 0 (long-array [1]))

Activity

There are no comments yet on this issue.

People

  • Assignee:
    Unassigned
    Reporter:
    A. R
Vote (0)
Watch (0)

Dates

  • Created:
    Updated: