Skip to content

Commit fbd2ba9

Browse files
committed
Restore array reference equality check
- This reverts the change in purescript#187 - Provides a major optimization for array equality checking. - Opting into this functionality within all nested records at the moment seems unrealistic compared to just restoring this here. Reviewed By: pbrant
1 parent f4cad0a commit fbd2ba9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Data/Eq.js

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export const eqStringImpl = refEq;
1313
export const eqArrayImpl = function (f) {
1414
return function (xs) {
1515
return function (ys) {
16+
if (xs === ys) return true;
1617
if (xs.length !== ys.length) return false;
1718
for (var i = 0; i < xs.length; i++) {
1819
if (!f(xs[i])(ys[i])) return false;

0 commit comments

Comments
 (0)