Skip to content

Instantly share code, notes, and snippets.

@kunalspathak
kunalspathak / core_benchmarks.md
Last active March 7, 2017 00:35
PGO improvements

Below comparison shows performance improvement with PGO binaries for following training set:

  • Techempower
  • Acmeair
  • Top 10 modules
  • core benchmarks
                                                improvement confidence     p.value
 arrays\\var-int.js n=25 type="Array"                0.04 %            0.703954006
 arrays\\var-int.js n=25 type="Buffer"               0.40 %         ** 0.003731872
@kunalspathak
kunalspathak / te_aa_pgo.md
Last active March 7, 2017 00:50
PGO improvements with minimal training set

Below comparison shows performance improvement with PGO binaries for following training set:

  • Techempower
  • Acmeair
                                                improvement confidence    p.value
 arrays\\var-int.js n=25 type="Array"                0.29 %            0.22755023
 arrays\\var-int.js n=25 type="Buffer"               0.08 %            0.55475179
 arrays\\var-int.js n=25 type="Float32Array"        -0.09 %            0.57513148
 arrays\\var-int.js n=25 type="Float64Array"         0.06 %            0.66479226

Source code : https://source.dot.net/#System.Private.CoreLib/BitOperations.cs,203

00007ff8`119ccce4 910003fd mov         fp,sp
00007ff8`119ccce8 53017c01 lsr         w1,w0,#1
00007ff8`119cccec 1200f021 and         w1,w1,#0x55555555
00007ff8`119cccf0 4b010000 sub         w0,w0,w1
00007ff8`119cccf4 1200e401 and         w1,w0,#0x33333333
00007ff8`119cccf8 53027c00 lsr         w0,w0,#2
00007ff8`119cccfc 1200e400 and         w0,w0,#0x33333333
#nullable enable
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Channels;
using System.Threading.Tasks;
using BenchmarkDotNet.Attributes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
namespace MiniBench
{

Benchmarks.run.Linux.x64.checked

Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 2028424
Total bytes of diff: 2013740
Total bytes of delta: -14684 (-0.72% of base)

Benchmarks.run.Linux.x64.checked


Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 106830
Total bytes of diff: 106996
Total bytes of delta: 166 (0.16% of base)
ONELINER|Code Size|Benchmarks.run.Linux.x64.checked\base|106830|106996|166|0.16%

Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 461140
Total bytes of diff: 459362
Total bytes of delta: -1778 (-0.39% of base)
ONELINER|Code Size|E:\spmi\asm.singledef4.aspnet.run.windows.x64.checked\base|461140|459362|-1778|-0.39%
Total relative delta: -1.56

asm.singledef4_rerun.benchmarks.run.Linux.x64.checked


Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 2028424
Total bytes of diff: 2013740
Total bytes of delta: -14684 (-0.72% of base)
Total relative delta: -11.44

Aspnet.run.windows.x64.checked


Summary of Code Size diffs:
(Lower is better)

Total bytes of base: 1470152
Total bytes of diff: 1457676
Total bytes of delta: -12476 (-0.85% of base)
Total relative delta: -14.90