JIT: Add BinaryTrees benchmark variant
authorAndy Ayers <andya@microsoft.com>
Tue, 10 Jan 2017 00:17:27 +0000 (16:17 -0800)
committerAndy Ayers <andya@microsoft.com>
Tue, 10 Jan 2017 02:22:22 +0000 (18:22 -0800)
commit7f9afbf706f51c5fca1d909eb8cd52cb0c48a8ff
treec031295a8a64167bf1be1302fc6655ccbc9b2ca1
parent4a89d65ff5a1f79cc886e3e22b737083db75717b
JIT: Add BinaryTrees benchmark variant

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 dotnet/coreclr#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.

Commit migrated from https://github.com/dotnet/coreclr/commit/f8b89a11985f763aff040875a96c47a166500f25
src/coreclr/tests/src/JIT/Performance/CodeQuality/BenchmarksGame/binarytrees/binarytrees.csharp.cs
src/coreclr/tests/src/JIT/Performance/CodeQuality/BenchmarksGame/binarytrees/binarytrees.csharp3.cs [new file with mode: 0644]
src/coreclr/tests/src/JIT/Performance/CodeQuality/BenchmarksGame/binarytrees/binarytrees.csproj
src/coreclr/tests/src/JIT/Performance/CodeQuality/BenchmarksGame/binarytrees/binarytrees3.csproj [new file with mode: 0644]