Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion sjsonnet/src/sjsonnet/Evaluator.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1387,7 +1387,9 @@ class Evaluator(
val yi = y.value(i)
// Reference equality short-circuit for shared array elements
if (!(xi eq yi)) {
// Inline numeric fast path to avoid polymorphic compare() dispatch
// Inline numeric fast path to avoid polymorphic compare() dispatch per element.
// In numeric array comparisons (e.g. 1M elements), this avoids recursive
// method calls with polymorphic dispatch across 5 type branches.
val cmp = xi match {
case xn: Val.Num =>
yi match {
Expand Down
Loading