prefetch in mark - #516
Merged
Merged
Conversation
This file contains hidden or 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
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.
Prefetching in
markgave me some mixed results, but generally good ones I think. A majority of my cache misses were inmark, which is not surprising as it is quite chaotic. However, it does push nodes to a stack in order to visit them later, and by prefetching a node when it is pushed, I get fewer cache misses.When compiling the compiler as the benchmark, I get 31% fewer cache misses, and my average runtime (over 5 runs) goes from 70.5 seconds to 66 seconds. The time spent marking nodes goes from 10.8 to 7.4 seconds.
However, when I test the change against the benchmarks mentioned in pr #515 , I get some more mixed results. The below percentages are the differences in absolute execution times, averaged over five runs.
NFib - +7.5%
FibTail - +3.4%
FibInt - +3.5%
NumericIntegration - +2.5%
TightIntLoop - +2.5%
ListFusion - +1.6%
FibInteger - +1.2%
PrimeSieve - +0.8%
MergeSort - -0.8%
ForkJoin - -0.8%
ExprVal - -0.4%
They are microbenchmarks, and don't run for as long. Additionally, the behavior of
markis naturally tightly related to the live node set, the allocation rate, etc etc. This differs between all these programs.