Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

JIT: Add BinaryTrees benchmark variant #8867

Merged
merged 1 commit into from
Jan 10, 2017

Conversation

AndyAyersMS
Copy link
Member

Add a variant that uses a class and out parameter instead of returning
a struct by value. This variant is similar to version 3 from the benchmarks
games site, but with validation added and parallelism removed.

See related analysis in #8837. According to xunit-perf runs, this version's
performance is improved (~10%) by enabling the model inlining policy. When
the model policy is enabled the inliner will inline the two outermost calls
to ChildTreeNodes in the innermlost loop.

Also, make sure the new and the original version to build the same way in
release and debug.

Add a variant that uses a class and out parameter instead of returning
a struct by value. This variant is similar to version 3 from the benchmarks
games site, but with validation added and parallelism removed.

See related analysis in #8837. According to xunit-perf runs, this version's
performance is improved (~10%) by enabling the model inlining policy. When
the model policy is enabled the inliner will inline the two outermost calls
to `ChildTreeNodes` in the innermlost loop.

Also, make sure the new and the original version to build the same way in
release and debug.
@AndyAyersMS
Copy link
Member Author

@sivarv @dotnet/jit-contrib PTAL

Siva, over in #8837 you didn't mention the relative perf impact from the model policy -- does 10% seem about right?

I didn't see any difference in GC counts -- haven't looked at GC times yet.

@sivarv
Copy link
Member

sivarv commented Jan 10, 2017

I have measured benchmark numbers with model policy on desktop. Here are the numbers on my machine

Jit64: 12880
RyuJIT with Legacy Policy: 14755
RyuJIt with Model Policy: 11739.33

In percentage terms it is 8.85%

@sivarv
Copy link
Member

sivarv commented Jan 10, 2017

10% improvement with model policy seems about right.
Btw, desktop was using workstation GC. Was your measurement against CoreCLR with Server GC?

@sivarv
Copy link
Member

sivarv commented Jan 10, 2017

Looks good.

@sivarv
Copy link
Member

sivarv commented Jan 10, 2017

Another point: On Desktop cqPerf script is exercising this benchmark with a depth argument of 20

@AndyAyersMS
Copy link
Member Author

Correction: model policy benefit is more like 6% at depth 16. If I increase depth to 20 the benefit looks similar to what you measured on desktop.

Depth Policy Time Time/Legacy
16 Legacy 0.258 1.0
16 Model 0.242 0.94
20 Legacy 5.33 1.0
20 Model 4.86 0.91

@AndyAyersMS
Copy link
Member Author

Retrying the arm legs which failed more or less immediately...

@dotnet-bot retest Linux ARM Emulator Cross Debug Build
@dotnet-bot retest Linux ARM Emulator Cross Release Build

@AndyAyersMS
Copy link
Member Author

@dotnet-bot retest Linux ARM Emulator Cross Debug Build
@dotnet-bot retest Linux ARM Emulator Cross Release Build

@AndyAyersMS
Copy link
Member Author

Am going to close/reopen and see if that cleans up the arm CI...

@AndyAyersMS
Copy link
Member Author

Trying to use this to validate #8875; evidently there's a time lag between when netci.groovy changes and the jobs get updated. Will retry in a few minutes.

@AndyAyersMS
Copy link
Member Author

@dotnet-bot retest Linux ARM Emulator Cross Debug Build
@dotnet-bot retest Linux ARM Emulator Cross Release Build

@AndyAyersMS AndyAyersMS merged commit ec54d18 into dotnet:master Jan 10, 2017
@AndyAyersMS AndyAyersMS deleted the BinaryTreesVariant branch January 10, 2017 21:42
@karelz karelz modified the milestone: 2.0.0 Aug 28, 2017
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
…riant

JIT: Add BinaryTrees benchmark variant

Commit migrated from dotnet/coreclr@ec54d18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants