0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-27 22:16:50 +01:00
nodejs/benchmark/assert
Ruben Bridgewater 449e9f4489 assert,util: improve deep equal comparison performance
This is mainly a performance improvement for a lot of simple cases.
Diverging elements are detected earlier and equal entries are
partially also detected faster.

A small correctness patch is also included where recursions now
stop as soon as either side has a circular structure. Before, both
sides had to have a circular structure at the specific comparison
which could have caused more checks that likely fail at a later
point.

Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de>
PR-URL: https://github.com/nodejs/node/pull/46593
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2023-02-20 15:47:06 +01:00
..
deepequal-buffer.js
deepequal-map.js
deepequal-object.js assert,util: improve deep equal comparison performance 2023-02-20 15:47:06 +01:00
deepequal-prims-and-objs-big-loop.js
deepequal-set.js
deepequal-simple-array-and-set.js
deepequal-typedarrays.js