mirror of https://github.com/lukechilds/node.git
Browse Source
Use a Map instead of an array for checking previously found cyclic references. This reduces complexity for an array-of-objects case from O(n²) to O(n·log n). Fixes: https://github.com/nodejs/node/issues/12842 PR-URL: https://github.com/nodejs/node/pull/12849 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>v6
1 changed files with 15 additions and 6 deletions
Loading…
Reference in new issue