Commit 588b4de
committed
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>1 parent cd5b83b commit 588b4de
File tree
4 files changed
+173
-132
lines changed- benchmark/assert
- doc/api
- lib/internal/util
- test/parallel
4 files changed
+173
-132
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
546 | 546 | | |
547 | 547 | | |
548 | 548 | | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
549 | 553 | | |
550 | 554 | | |
551 | 555 | | |
| |||
617 | 621 | | |
618 | 622 | | |
619 | 623 | | |
620 | | - | |
| 624 | + | |
621 | 625 | | |
622 | 626 | | |
623 | 627 | | |
| |||
727 | 731 | | |
728 | 732 | | |
729 | 733 | | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
730 | 738 | | |
731 | 739 | | |
732 | 740 | | |
| |||
780 | 788 | | |
781 | 789 | | |
782 | 790 | | |
783 | | - | |
| 791 | + | |
784 | 792 | | |
785 | 793 | | |
786 | 794 | | |
| |||
0 commit comments