Skip to content

Commit b9d957f

Browse files
rauhsdnolen
authored andcommitted
CLJS-2042: Variadic invoke calls array_seq inefficiently
Directly invoke prim_seq instead of going through the dispatcher.
1 parent e58cbb4 commit b9d957f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/clojure/cljs/compiler.cljc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,8 +1027,9 @@
10271027
(let [mfa (:max-fixed-arity variadic-invoke)]
10281028
(emits f "(" (comma-sep (take mfa args))
10291029
(when-not (zero? mfa) ",")
1030-
"cljs.core.array_seq([" (comma-sep (drop mfa args)) "], 0))"))
1031-
1030+
"cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2(["
1031+
(comma-sep (drop mfa args)) "], 0))"))
1032+
10321033
(or fn? js? goog?)
10331034
(emits f "(" (comma-sep args) ")")
10341035

0 commit comments

Comments
 (0)