-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement breadth-first tracing #30
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Now POSSIBLE_CYCLES doesn't need a RefCell anymore
Also, `TRACED` is renamed to `IN_LIST` and the `DROPPED` marking is moved to a special value of the tracing counter
Benchmark results: bench::stress_tests_group::stress_test_bench seed:0xCAFE
Instructions: 88112126 (-1.077200%)
L1 Hits: 127079989 (-1.545711%)
L2 Hits: 2098136 (+24.85456%)
RAM Hits: 93669 (-0.033084%)
Total read+write: 129271794 (-1.205576%)
Estimated Cycles: 140849084 (+0.065465%)
bench::binary_trees_group::count_binary_trees_bench depth:11
Instructions: 89523745 (-0.576268%)
L1 Hits: 132816431 (-0.582603%)
L2 Hits: 243455 (No Change)
RAM Hits: 2106 (+0.095057%)
Total read+write: 133061992 (-0.581533%)
Estimated Cycles: 134107416 (-0.576975%)
bench::binary_trees_group::count_binary_trees_with_parent_bench depth:11
Instructions: 170355232 (+1.478116%)
L1 Hits: 251425962 (+1.315872%)
L2 Hits: 2069217 (+34.89847%)
RAM Hits: 3952 (-0.050582%)
Total read+write: 253499131 (+1.522149%)
Estimated Cycles: 261910367 (+2.321362%)
bench::linked_lists_group::large_linked_list_bench size:4096
Instructions: 91453936 (-5.159594%)
L1 Hits: 133385526 (-6.253305%)
L2 Hits: 1453928 (-20.55043%)
RAM Hits: 8097 (-19.53692%)
Total read+write: 134847551 (-6.435771%)
Estimated Cycles: 140938561 (-7.145997%) Old results:
bench::stress_tests_group::stress_test_bench seed:0xCAFE
Instructions: 89071605
L1 Hits: 129075117
L2 Hits: 1680464
RAM Hits: 93700
Total read+write: 130849281
Estimated Cycles: 140756937
bench::binary_trees_group::count_binary_trees_bench depth:11
Instructions: 90042632
L1 Hits: 133594758
L2 Hits: 243455
RAM Hits: 2104
Total read+write: 133840317
Estimated Cycles: 134885673
bench::binary_trees_group::count_binary_trees_with_parent_bench depth:11
Instructions: 167873861
L1 Hits: 248160488
L2 Hits: 1533907
RAM Hits: 3954
Total read+write: 249698349
Estimated Cycles: 255968413
bench::linked_lists_group::large_linked_list_bench size:4096
Instructions: 96429296
L1 Hits: 142282911
L2 Hits: 1830001
RAM Hits: 10063
Total read+write: 144122975
Estimated Cycles: 151785121 Results without finalization:
bench::stress_tests_group::stress_test_bench seed:0xCAFE
Instructions: 87735516 (+1.440258%)
L1 Hits: 126567770 (+1.614827%)
L2 Hits: 2085672 (+24.94104%)
RAM Hits: 93668 (-0.024549%)
Total read+write: 128747110 (+1.921869%)
Estimated Cycles: 140274510 (+3.005018%)
bench::binary_trees_group::count_binary_trees_bench depth:11
Instructions: 88748136 (-0.291518%)
L1 Hits: 131780365 (-0.195499%)
L2 Hits: 244478 (-0.546737%)
RAM Hits: 2104 (+0.047551%)
Total read+write: 132026947 (-0.196148%)
Estimated Cycles: 133076395 (-0.198603%)
bench::binary_trees_group::count_binary_trees_with_parent_bench depth:11
Instructions: 126835625 (+2.813601%)
L1 Hits: 189681174 (+3.434388%)
L2 Hits: 1189021 (+36.02663%)
RAM Hits: 3942 (-0.025361%)
Total read+write: 190874137 (+3.588927%)
Estimated Cycles: 195764249 (+4.189974%)
bench::linked_lists_group::large_linked_list_bench size:4096
Instructions: 70743587 (-0.172408%)
L1 Hits: 104464742 (-0.326628%)
L2 Hits: 691804 (-27.99469%)
RAM Hits: 8094 (-19.47871%)
Total read+write: 105164640 (-0.579753%)
Estimated Cycles: 108207052 (-1.596613%) Old results without finalization:
bench::stress_tests_group::stress_test_bench seed:0xCAFE
Instructions: 86489839
L1 Hits: 124556400
L2 Hits: 1669325
RAM Hits: 93691
Total read+write: 126319416
Estimated Cycles: 136182210
bench::binary_trees_group::count_binary_trees_bench depth:11
Instructions: 89007609
L1 Hits: 132038499
L2 Hits: 245822
RAM Hits: 2103
Total read+write: 132286424
Estimated Cycles: 133341214
bench::binary_trees_group::count_binary_trees_with_parent_bench depth:11
Instructions: 123364636
L1 Hits: 183383088
L2 Hits: 874109
RAM Hits: 3943
Total read+write: 184261140
Estimated Cycles: 187891638
bench::linked_lists_group::large_linked_list_bench size:4096
Instructions: 70865765
L1 Hits: 104807071
L2 Hits: 960768
RAM Hits: 10052
Total read+write: 105777891
Estimated Cycles: 109962731 |
Benchmark results: bench::stress_tests_group::stress_test_bench seed:0xCAFE
Instructions: 88386421 (-0.769251%)
L1 Hits: 127138637 (-1.500268%)
L2 Hits: 2096419 (+24.75194%)
RAM Hits: 93671 (-0.033084%)
Total read+write: 129328727 (-1.162065%)
Estimated Cycles: 140899217 (+0.101017%)
bench::binary_trees_group::count_binary_trees_bench depth:11
Instructions: 89523745 (-0.576268%)
L1 Hits: 132816431 (-0.582362%)
L2 Hits: 243455 (-0.131269%)
RAM Hits: 2106 (-0.094877%)
Total read+write: 133061992 (-0.581533%)
Estimated Cycles: 134107416 (-0.578019%)
bench::binary_trees_group::count_binary_trees_with_parent_bench depth:11
Instructions: 169957696 (+1.241310%)
L1 Hits: 250344628 (+0.880055%)
L2 Hits: 1987606 (+29.59422%)
RAM Hits: 3953 (-0.075834%)
Total read+write: 252336187 (+1.056410%)
Estimated Cycles: 260421013 (+1.739790%)
bench::linked_lists_group::large_linked_list_bench size:4096
Instructions: 91269316 (-5.351050%)
L1 Hits: 132740534 (-6.706604%)
L2 Hits: 1299811 (-28.97309%)
RAM Hits: 8096 (-19.56284%)
Total read+write: 134048441 (-6.990235%)
Estimated Cycles: 139522949 (-8.078741%) Old results:
bench::stress_tests_group::stress_test_bench seed:0xCAFE
Instructions: 89071605
L1 Hits: 129075109
L2 Hits: 1680470
RAM Hits: 93702
Total read+write: 130849281
Estimated Cycles: 140757029
bench::binary_trees_group::count_binary_trees_bench depth:11
Instructions: 90042632
L1 Hits: 133594434
L2 Hits: 243775
RAM Hits: 2108
Total read+write: 133840317
Estimated Cycles: 134887089
bench::binary_trees_group::count_binary_trees_with_parent_bench depth:11
Instructions: 167873861
L1 Hits: 248160678
L2 Hits: 1533715
RAM Hits: 3956
Total read+write: 249698349
Estimated Cycles: 255967713
bench::linked_lists_group::large_linked_list_bench size:4096
Instructions: 96429296
L1 Hits: 142282884
L2 Hits: 1830026
RAM Hits: 10065
Total read+write: 144122975
Estimated Cycles: 151785289 Results without finalization:
bench::stress_tests_group::stress_test_bench seed:0xCAFE
Instructions: 87372621 (+1.020677%)
L1 Hits: 125994614 (+1.154658%)
L2 Hits: 2084236 (+24.85599%)
RAM Hits: 93665 (-0.027751%)
Total read+write: 128172515 (+1.466995%)
Estimated Cycles: 139694069 (+2.578833%)
bench::binary_trees_group::count_binary_trees_bench depth:11
Instructions: 88748136 (-0.291518%)
L1 Hits: 131779022 (-0.197531%)
L2 Hits: 245822 (+0.549743%)
RAM Hits: 2103 (-0.095012%)
Total read+write: 132026947 (-0.196148%)
Estimated Cycles: 133081737 (-0.190623%)
bench::binary_trees_group::count_binary_trees_with_parent_bench depth:11
Instructions: 126568041 (+2.596696%)
L1 Hits: 189154229 (+3.147125%)
L2 Hits: 1188960 (+35.99678%)
RAM Hits: 3940 (-0.126743%)
Total read+write: 190347129 (+3.302915%)
Estimated Cycles: 195236929 (+3.908960%)
bench::linked_lists_group::large_linked_list_bench size:4096
Instructions: 70620587 (-0.345975%)
L1 Hits: 104218803 (-0.561262%)
L2 Hits: 691837 (-27.99335%)
RAM Hits: 8090 (-19.50249%)
Total read+write: 104918730 (-0.812231%)
Estimated Cycles: 107961138 (-1.820286%) Old results without finalization:
bench::stress_tests_group::stress_test_bench seed:0xCAFE
Instructions: 86489839
L1 Hits: 124556413
L2 Hits: 1669312
RAM Hits: 93691
Total read+write: 126319416
Estimated Cycles: 136182158
bench::binary_trees_group::count_binary_trees_bench depth:11
Instructions: 89007609
L1 Hits: 132039841
L2 Hits: 244478
RAM Hits: 2105
Total read+write: 132286424
Estimated Cycles: 133335906
bench::binary_trees_group::count_binary_trees_with_parent_bench depth:11
Instructions: 123364636
L1 Hits: 183382939
L2 Hits: 874256
RAM Hits: 3945
Total read+write: 184261140
Estimated Cycles: 187892294
bench::linked_lists_group::large_linked_list_bench size:4096
Instructions: 70865765
L1 Hits: 104807045
L2 Hits: 960796
RAM Hits: 10050
Total read+write: 105777891
Estimated Cycles: 109962775 |
9a366b2
to
d2c3c90
Compare
Benchmark results: bench::stress_tests_group::stress_test_bench seed:0xCAFE
Instructions: 87559213 (-1.697951%)
L1 Hits: 125897889 (-2.461528%)
L2 Hits: 2096357 (+24.74825%)
RAM Hits: 93669 (-0.035218%)
Total read+write: 128087915 (-2.110341%)
Estimated Cycles: 139658089 (-0.780735%)
bench::binary_trees_group::count_binary_trees_bench depth:11
Instructions: 89523745 (-0.576268%)
L1 Hits: 132816432 (-0.582361%)
L2 Hits: 243455 (-0.131269%)
RAM Hits: 2105 (-0.142315%)
Total read+write: 133061992 (-0.581533%)
Estimated Cycles: 134107382 (-0.578044%)
bench::binary_trees_group::count_binary_trees_with_parent_bench depth:11
Instructions: 167882304 (+0.005029%)
L1 Hits: 247231890 (-0.374269%)
L2 Hits: 1987258 (+29.57153%)
RAM Hits: 3951 (-0.126390%)
Total read+write: 249223099 (-0.190330%)
Estimated Cycles: 257306465 (+0.523016%)
bench::linked_lists_group::large_linked_list_bench size:4096
Instructions: 90286036 (-6.370740%)
L1 Hits: 131265765 (-7.743109%)
L2 Hits: 1299662 (-28.98123%)
RAM Hits: 8094 (-19.58271%)
Total read+write: 132573521 (-8.013611%)
Estimated Cycles: 138047365 (-9.050893%) Old results:
bench::stress_tests_group::stress_test_bench seed:0xCAFE
Instructions: 89071605
L1 Hits: 129075109
L2 Hits: 1680470
RAM Hits: 93702
Total read+write: 130849281
Estimated Cycles: 140757029
bench::binary_trees_group::count_binary_trees_bench depth:11
Instructions: 90042632
L1 Hits: 133594434
L2 Hits: 243775
RAM Hits: 2108
Total read+write: 133840317
Estimated Cycles: 134887089
bench::binary_trees_group::count_binary_trees_with_parent_bench depth:11
Instructions: 167873861
L1 Hits: 248160678
L2 Hits: 1533715
RAM Hits: 3956
Total read+write: 249698349
Estimated Cycles: 255967713
bench::linked_lists_group::large_linked_list_bench size:4096
Instructions: 96429296
L1 Hits: 142282884
L2 Hits: 1830026
RAM Hits: 10065
Total read+write: 144122975
Estimated Cycles: 151785289 Results without finalization:
bench::stress_tests_group::stress_test_bench seed:0xCAFE
Instructions: 86551541 (+0.071340%)
L1 Hits: 124763059 (+0.165906%)
L2 Hits: 2084174 (+24.85227%)
RAM Hits: 93662 (-0.030953%)
Total read+write: 126940895 (+0.491990%)
Estimated Cycles: 138462099 (+1.674185%)
bench::binary_trees_group::count_binary_trees_bench depth:11
Instructions: 88748136 (-0.291518%)
L1 Hits: 131779022 (-0.197531%)
L2 Hits: 245823 (+0.550152%)
RAM Hits: 2102 (-0.142518%)
Total read+write: 132026947 (-0.196148%)
Estimated Cycles: 133081707 (-0.190646%)
bench::binary_trees_group::count_binary_trees_with_parent_bench depth:11
Instructions: 125530345 (+1.755535%)
L1 Hits: 187598085 (+2.298549%)
L2 Hits: 1188559 (+35.95091%)
RAM Hits: 3941 (-0.101394%)
Total read+write: 188790585 (+2.458166%)
Estimated Cycles: 193678815 (+3.079701%)
bench::linked_lists_group::large_linked_list_bench size:4096
Instructions: 70128947 (-1.039738%)
L1 Hits: 103481372 (-1.264870%)
L2 Hits: 691807 (-27.99647%)
RAM Hits: 8091 (-19.49254%)
Total read+write: 104181270 (-1.509409%)
Estimated Cycles: 107223592 (-2.491009%) Old results without finalization:
bench::stress_tests_group::stress_test_bench seed:0xCAFE
Instructions: 86489839
L1 Hits: 124556413
L2 Hits: 1669312
RAM Hits: 93691
Total read+write: 126319416
Estimated Cycles: 136182158
bench::binary_trees_group::count_binary_trees_bench depth:11
Instructions: 89007609
L1 Hits: 132039841
L2 Hits: 244478
RAM Hits: 2105
Total read+write: 132286424
Estimated Cycles: 133335906
bench::binary_trees_group::count_binary_trees_with_parent_bench depth:11
Instructions: 123364636
L1 Hits: 183382939
L2 Hits: 874256
RAM Hits: 3945
Total read+write: 184261140
Estimated Cycles: 187892294
bench::linked_lists_group::large_linked_list_bench size:4096
Instructions: 70865765
L1 Hits: 104807045
L2 Hits: 960796
RAM Hits: 10050
Total read+write: 105777891
Estimated Cycles: 109962775 |
This improves performance when weak pointers are enabled.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Use a queue to implement breadth-first tracing (instead of depth-first) and avoid the possibility of a stack overflow with very nested objects.