update fill benchmarks

This commit is contained in:
Hans Dembinski 2019-06-03 23:27:25 +02:00
parent badcd1c115
commit 3b687db2bc
7 changed files with 1483 additions and 1191 deletions

View File

@ -33,28 +33,28 @@ using DStore = boost::histogram::adaptive_storage<>;
using namespace boost::histogram;
using reg = axis::regular<>;
template <class Tag, class Storage, class Distribution>
template <class Distribution, class Tag, class Storage>
static void fill_1d(benchmark::State& state) {
auto h = make_s(Tag(), Storage(), reg(100, 0, 1));
auto gen = generator<Distribution>();
for (auto _ : state) benchmark::DoNotOptimize(h(gen()));
}
template <class Tag, class Storage, class Distribution>
template <class Distribution, class Tag, class Storage>
static void fill_2d(benchmark::State& state) {
auto h = make_s(Tag(), Storage(), reg(100, 0, 1), reg(100, 0, 1));
auto gen = generator<Distribution>();
for (auto _ : state) benchmark::DoNotOptimize(h(gen(), gen()));
}
template <class Tag, class Storage, class Distribution>
template <class Distribution, class Tag, class Storage>
static void fill_3d(benchmark::State& state) {
auto h = make_s(Tag(), Storage(), reg(100, 0, 1), reg(100, 0, 1), reg(100, 0, 1));
auto gen = generator<Distribution>();
for (auto _ : state) benchmark::DoNotOptimize(h(gen(), gen(), gen()));
}
template <class Tag, class Storage, class Distribution>
template <class Distribution, class Tag, class Storage>
static void fill_6d(benchmark::State& state) {
auto h = make_s(Tag(), Storage(), reg(10, 0, 1), reg(10, 0, 1), reg(10, 0, 1),
reg(10, 0, 1), reg(10, 0, 1), reg(10, 0, 1));
@ -63,36 +63,36 @@ static void fill_6d(benchmark::State& state) {
benchmark::DoNotOptimize(h(gen(), gen(), gen(), gen(), gen(), gen()));
}
BENCHMARK_TEMPLATE(fill_1d, static_tag, SStore, uniform);
BENCHMARK_TEMPLATE(fill_1d, static_tag, DStore, uniform);
BENCHMARK_TEMPLATE(fill_1d, dynamic_tag, SStore, uniform);
BENCHMARK_TEMPLATE(fill_1d, dynamic_tag, DStore, uniform);
BENCHMARK_TEMPLATE(fill_2d, static_tag, SStore, uniform);
BENCHMARK_TEMPLATE(fill_2d, static_tag, DStore, uniform);
BENCHMARK_TEMPLATE(fill_2d, dynamic_tag, SStore, uniform);
BENCHMARK_TEMPLATE(fill_2d, dynamic_tag, DStore, uniform);
BENCHMARK_TEMPLATE(fill_3d, static_tag, SStore, uniform);
BENCHMARK_TEMPLATE(fill_3d, static_tag, DStore, uniform);
BENCHMARK_TEMPLATE(fill_3d, dynamic_tag, SStore, uniform);
BENCHMARK_TEMPLATE(fill_3d, dynamic_tag, DStore, uniform);
BENCHMARK_TEMPLATE(fill_6d, static_tag, SStore, uniform);
BENCHMARK_TEMPLATE(fill_6d, static_tag, DStore, uniform);
BENCHMARK_TEMPLATE(fill_6d, dynamic_tag, SStore, uniform);
BENCHMARK_TEMPLATE(fill_6d, dynamic_tag, DStore, uniform);
BENCHMARK_TEMPLATE(fill_1d, uniform, static_tag, SStore);
BENCHMARK_TEMPLATE(fill_1d, uniform, static_tag, DStore);
BENCHMARK_TEMPLATE(fill_1d, uniform, dynamic_tag, SStore);
BENCHMARK_TEMPLATE(fill_1d, uniform, dynamic_tag, DStore);
BENCHMARK_TEMPLATE(fill_2d, uniform, static_tag, SStore);
BENCHMARK_TEMPLATE(fill_2d, uniform, static_tag, DStore);
BENCHMARK_TEMPLATE(fill_2d, uniform, dynamic_tag, SStore);
BENCHMARK_TEMPLATE(fill_2d, uniform, dynamic_tag, DStore);
BENCHMARK_TEMPLATE(fill_3d, uniform, static_tag, SStore);
BENCHMARK_TEMPLATE(fill_3d, uniform, static_tag, DStore);
BENCHMARK_TEMPLATE(fill_3d, uniform, dynamic_tag, SStore);
BENCHMARK_TEMPLATE(fill_3d, uniform, dynamic_tag, DStore);
BENCHMARK_TEMPLATE(fill_6d, uniform, static_tag, SStore);
BENCHMARK_TEMPLATE(fill_6d, uniform, static_tag, DStore);
BENCHMARK_TEMPLATE(fill_6d, uniform, dynamic_tag, SStore);
BENCHMARK_TEMPLATE(fill_6d, uniform, dynamic_tag, DStore);
BENCHMARK_TEMPLATE(fill_1d, static_tag, SStore, normal);
BENCHMARK_TEMPLATE(fill_1d, static_tag, DStore, normal);
BENCHMARK_TEMPLATE(fill_1d, dynamic_tag, SStore, normal);
BENCHMARK_TEMPLATE(fill_1d, dynamic_tag, DStore, normal);
BENCHMARK_TEMPLATE(fill_2d, static_tag, SStore, normal);
BENCHMARK_TEMPLATE(fill_2d, static_tag, DStore, normal);
BENCHMARK_TEMPLATE(fill_2d, dynamic_tag, SStore, normal);
BENCHMARK_TEMPLATE(fill_2d, dynamic_tag, DStore, normal);
BENCHMARK_TEMPLATE(fill_3d, static_tag, SStore, normal);
BENCHMARK_TEMPLATE(fill_3d, static_tag, DStore, normal);
BENCHMARK_TEMPLATE(fill_3d, dynamic_tag, SStore, normal);
BENCHMARK_TEMPLATE(fill_3d, dynamic_tag, DStore, normal);
BENCHMARK_TEMPLATE(fill_6d, static_tag, SStore, normal);
BENCHMARK_TEMPLATE(fill_6d, static_tag, DStore, normal);
BENCHMARK_TEMPLATE(fill_6d, dynamic_tag, SStore, normal);
BENCHMARK_TEMPLATE(fill_6d, dynamic_tag, DStore, normal);
BENCHMARK_TEMPLATE(fill_1d, normal, static_tag, SStore);
BENCHMARK_TEMPLATE(fill_1d, normal, static_tag, DStore);
BENCHMARK_TEMPLATE(fill_1d, normal, dynamic_tag, SStore);
BENCHMARK_TEMPLATE(fill_1d, normal, dynamic_tag, DStore);
BENCHMARK_TEMPLATE(fill_2d, normal, static_tag, SStore);
BENCHMARK_TEMPLATE(fill_2d, normal, static_tag, DStore);
BENCHMARK_TEMPLATE(fill_2d, normal, dynamic_tag, SStore);
BENCHMARK_TEMPLATE(fill_2d, normal, dynamic_tag, DStore);
BENCHMARK_TEMPLATE(fill_3d, normal, static_tag, SStore);
BENCHMARK_TEMPLATE(fill_3d, normal, static_tag, DStore);
BENCHMARK_TEMPLATE(fill_3d, normal, dynamic_tag, SStore);
BENCHMARK_TEMPLATE(fill_3d, normal, dynamic_tag, DStore);
BENCHMARK_TEMPLATE(fill_6d, normal, static_tag, SStore);
BENCHMARK_TEMPLATE(fill_6d, normal, static_tag, DStore);
BENCHMARK_TEMPLATE(fill_6d, normal, dynamic_tag, SStore);
BENCHMARK_TEMPLATE(fill_6d, normal, dynamic_tag, DStore);

424
doc/fill_boost.json Normal file
View File

@ -0,0 +1,424 @@
{
"context": {
"date": "2019-06-03 22:46:01",
"host_name": "hfm-1608b",
"executable": "./benchmark/histogram_filling",
"num_cpus": 4,
"mhz_per_cpu": 2900,
"cpu_scaling_enabled": false,
"caches": [
{
"type": "Data",
"level": 1,
"size": 32768000,
"num_sharing": 2
},
{
"type": "Instruction",
"level": 1,
"size": 32768000,
"num_sharing": 2
},
{
"type": "Unified",
"level": 2,
"size": 262144000,
"num_sharing": 2
},
{
"type": "Unified",
"level": 3,
"size": 3145728000,
"num_sharing": 4
}
],
"load_avg": [1.94482,1.84375,1.88086],
"library_build_type": "release"
},
"benchmarks": [
{
"name": "fill_1d<uniform, static_tag, SStore>",
"run_name": "fill_1d<uniform, static_tag, SStore>",
"run_type": "iteration",
"repetitions": 0,
"repetition_index": 0,
"threads": 1,
"iterations": 211582638,
"real_time": 3.2654878988471729e+00,
"cpu_time": 3.2504321077611293e+00,
"time_unit": "ns"
},
{
"name": "fill_1d<uniform, static_tag, DStore>",
"run_name": "fill_1d<uniform, static_tag, DStore>",
"run_type": "iteration",
"repetitions": 0,
"repetition_index": 0,
"threads": 1,
"iterations": 93383138,
"real_time": 7.3823090631954882e+00,
"cpu_time": 7.3751430370652162e+00,
"time_unit": "ns"
},
{
"name": "fill_1d<uniform, dynamic_tag, SStore>",
"run_name": "fill_1d<uniform, dynamic_tag, SStore>",
"run_type": "iteration",
"repetitions": 0,
"repetition_index": 0,
"threads": 1,
"iterations": 78343593,
"real_time": 8.1329426389531037e+00,
"cpu_time": 8.1170900599363680e+00,
"time_unit": "ns"
},
{
"name": "fill_1d<uniform, dynamic_tag, DStore>",
"run_name": "fill_1d<uniform, dynamic_tag, DStore>",
"run_type": "iteration",
"repetitions": 0,
"repetition_index": 0,
"threads": 1,
"iterations": 39937241,
"real_time": 1.7775896637521118e+01,
"cpu_time": 1.7767226333937288e+01,
"time_unit": "ns"
},
{
"name": "fill_2d<uniform, static_tag, SStore>",
"run_name": "fill_2d<uniform, static_tag, SStore>",
"run_type": "iteration",
"repetitions": 0,
"repetition_index": 0,
"threads": 1,
"iterations": 108083070,
"real_time": 6.4143512207888973e+00,
"cpu_time": 6.4071551631536723e+00,
"time_unit": "ns"
},
{
"name": "fill_2d<uniform, static_tag, DStore>",
"run_name": "fill_2d<uniform, static_tag, DStore>",
"run_type": "iteration",
"repetitions": 0,
"repetition_index": 0,
"threads": 1,
"iterations": 68325346,
"real_time": 1.0048392276019259e+01,
"cpu_time": 1.0035558400245788e+01,
"time_unit": "ns"
},
{
"name": "fill_2d<uniform, dynamic_tag, SStore>",
"run_name": "fill_2d<uniform, dynamic_tag, SStore>",
"run_type": "iteration",
"repetitions": 0,
"repetition_index": 0,
"threads": 1,
"iterations": 40751220,
"real_time": 1.7163308926762884e+01,
"cpu_time": 1.7119021221941306e+01,
"time_unit": "ns"
},
{
"name": "fill_2d<uniform, dynamic_tag, DStore>",
"run_name": "fill_2d<uniform, dynamic_tag, DStore>",
"run_type": "iteration",
"repetitions": 0,
"repetition_index": 0,
"threads": 1,
"iterations": 33297816,
"real_time": 2.2170961963473680e+01,
"cpu_time": 2.2158480303933437e+01,
"time_unit": "ns"
},
{
"name": "fill_3d<uniform, static_tag, SStore>",
"run_name": "fill_3d<uniform, static_tag, SStore>",
"run_type": "iteration",
"repetitions": 0,
"repetition_index": 0,
"threads": 1,
"iterations": 26180752,
"real_time": 2.6828972368536800e+01,
"cpu_time": 2.6783226089151292e+01,
"time_unit": "ns"
},
{
"name": "fill_3d<uniform, static_tag, DStore>",
"run_name": "fill_3d<uniform, static_tag, DStore>",
"run_type": "iteration",
"repetitions": 0,
"repetition_index": 0,
"threads": 1,
"iterations": 29750521,
"real_time": 2.5153930783308557e+01,
"cpu_time": 2.5081913691528293e+01,
"time_unit": "ns"
},
{
"name": "fill_3d<uniform, dynamic_tag, SStore>",
"run_name": "fill_3d<uniform, dynamic_tag, SStore>",
"run_type": "iteration",
"repetitions": 0,
"repetition_index": 0,
"threads": 1,
"iterations": 13187393,
"real_time": 3.8507794527890290e+01,
"cpu_time": 3.8476444889448665e+01,
"time_unit": "ns"
},
{
"name": "fill_3d<uniform, dynamic_tag, DStore>",
"run_name": "fill_3d<uniform, dynamic_tag, DStore>",
"run_type": "iteration",
"repetitions": 0,
"repetition_index": 0,
"threads": 1,
"iterations": 19273658,
"real_time": 3.9716659857892381e+01,
"cpu_time": 3.9607686304281280e+01,
"time_unit": "ns"
},
{
"name": "fill_6d<uniform, static_tag, SStore>",
"run_name": "fill_6d<uniform, static_tag, SStore>",
"run_type": "iteration",
"repetitions": 0,
"repetition_index": 0,
"threads": 1,
"iterations": 19864693,
"real_time": 3.4186233384211675e+01,
"cpu_time": 3.4147721286203591e+01,
"time_unit": "ns"
},
{
"name": "fill_6d<uniform, static_tag, DStore>",
"run_name": "fill_6d<uniform, static_tag, DStore>",
"run_type": "iteration",
"repetitions": 0,
"repetition_index": 0,
"threads": 1,
"iterations": 19838514,
"real_time": 3.4093378163424731e+01,
"cpu_time": 3.4068126271957730e+01,
"time_unit": "ns"
},
{
"name": "fill_6d<uniform, dynamic_tag, SStore>",
"run_name": "fill_6d<uniform, dynamic_tag, SStore>",
"run_type": "iteration",
"repetitions": 0,
"repetition_index": 0,
"threads": 1,
"iterations": 12146452,
"real_time": 5.9768750001608446e+01,
"cpu_time": 5.9593040008720223e+01,
"time_unit": "ns"
},
{
"name": "fill_6d<uniform, dynamic_tag, DStore>",
"run_name": "fill_6d<uniform, dynamic_tag, DStore>",
"run_type": "iteration",
"repetitions": 0,
"repetition_index": 0,
"threads": 1,
"iterations": 9037272,
"real_time": 6.9848559720449813e+01,
"cpu_time": 6.9735867195321759e+01,
"time_unit": "ns"
},
{
"name": "fill_1d<normal, static_tag, SStore>",
"run_name": "fill_1d<normal, static_tag, SStore>",
"run_type": "iteration",
"repetitions": 0,
"repetition_index": 0,
"threads": 1,
"iterations": 157565035,
"real_time": 4.5717857645366173e+00,
"cpu_time": 4.5457547101106472e+00,
"time_unit": "ns"
},
{
"name": "fill_1d<normal, static_tag, DStore>",
"run_name": "fill_1d<normal, static_tag, DStore>",
"run_type": "iteration",
"repetitions": 0,
"repetition_index": 0,
"threads": 1,
"iterations": 79651355,
"real_time": 8.6797866778668080e+00,
"cpu_time": 8.6658036137615060e+00,
"time_unit": "ns"
},
{
"name": "fill_1d<normal, dynamic_tag, SStore>",
"run_name": "fill_1d<normal, dynamic_tag, SStore>",
"run_type": "iteration",
"repetitions": 0,
"repetition_index": 0,
"threads": 1,
"iterations": 61556861,
"real_time": 9.1323363125960331e+00,
"cpu_time": 9.1087328185886918e+00,
"time_unit": "ns"
},
{
"name": "fill_1d<normal, dynamic_tag, DStore>",
"run_name": "fill_1d<normal, dynamic_tag, DStore>",
"run_type": "iteration",
"repetitions": 0,
"repetition_index": 0,
"threads": 1,
"iterations": 41711606,
"real_time": 1.8212414237941534e+01,
"cpu_time": 1.8182685174001598e+01,
"time_unit": "ns"
},
{
"name": "fill_2d<normal, static_tag, SStore>",
"run_name": "fill_2d<normal, static_tag, SStore>",
"run_type": "iteration",
"repetitions": 0,
"repetition_index": 0,
"threads": 1,
"iterations": 87550341,
"real_time": 7.9218920918366562e+00,
"cpu_time": 7.8999349642738466e+00,
"time_unit": "ns"
},
{
"name": "fill_2d<normal, static_tag, DStore>",
"run_name": "fill_2d<normal, static_tag, DStore>",
"run_type": "iteration",
"repetitions": 0,
"repetition_index": 0,
"threads": 1,
"iterations": 56773482,
"real_time": 1.2197691291888534e+01,
"cpu_time": 1.2188454461891178e+01,
"time_unit": "ns"
},
{
"name": "fill_2d<normal, dynamic_tag, SStore>",
"run_name": "fill_2d<normal, dynamic_tag, SStore>",
"run_type": "iteration",
"repetitions": 0,
"repetition_index": 0,
"threads": 1,
"iterations": 36337398,
"real_time": 1.9224432800549096e+01,
"cpu_time": 1.9205475306734904e+01,
"time_unit": "ns"
},
{
"name": "fill_2d<normal, dynamic_tag, DStore>",
"run_name": "fill_2d<normal, dynamic_tag, DStore>",
"run_type": "iteration",
"repetitions": 0,
"repetition_index": 0,
"threads": 1,
"iterations": 28607275,
"real_time": 2.4197160687273140e+01,
"cpu_time": 2.4125751229363750e+01,
"time_unit": "ns"
},
{
"name": "fill_3d<normal, static_tag, SStore>",
"run_name": "fill_3d<normal, static_tag, SStore>",
"run_type": "iteration",
"repetitions": 0,
"repetition_index": 0,
"threads": 1,
"iterations": 26180850,
"real_time": 2.5803523338619211e+01,
"cpu_time": 2.5746795845054681e+01,
"time_unit": "ns"
},
{
"name": "fill_3d<normal, static_tag, DStore>",
"run_name": "fill_3d<normal, static_tag, DStore>",
"run_type": "iteration",
"repetitions": 0,
"repetition_index": 0,
"threads": 1,
"iterations": 25426161,
"real_time": 2.6093175489781256e+01,
"cpu_time": 2.6065004465282801e+01,
"time_unit": "ns"
},
{
"name": "fill_3d<normal, dynamic_tag, SStore>",
"run_name": "fill_3d<normal, dynamic_tag, SStore>",
"run_type": "iteration",
"repetitions": 0,
"repetition_index": 0,
"threads": 1,
"iterations": 16850092,
"real_time": 3.8582457710183185e+01,
"cpu_time": 3.8556644082418039e+01,
"time_unit": "ns"
},
{
"name": "fill_3d<normal, dynamic_tag, DStore>",
"run_name": "fill_3d<normal, dynamic_tag, DStore>",
"run_type": "iteration",
"repetitions": 0,
"repetition_index": 0,
"threads": 1,
"iterations": 18269655,
"real_time": 3.8220521679381470e+01,
"cpu_time": 3.8191908933146372e+01,
"time_unit": "ns"
},
{
"name": "fill_6d<normal, static_tag, SStore>",
"run_name": "fill_6d<normal, static_tag, SStore>",
"run_type": "iteration",
"repetitions": 0,
"repetition_index": 0,
"threads": 1,
"iterations": 15453016,
"real_time": 4.0211380160144714e+01,
"cpu_time": 4.0163745381484254e+01,
"time_unit": "ns"
},
{
"name": "fill_6d<normal, static_tag, DStore>",
"run_name": "fill_6d<normal, static_tag, DStore>",
"run_type": "iteration",
"repetitions": 0,
"repetition_index": 0,
"threads": 1,
"iterations": 13724952,
"real_time": 3.9393502942740675e+01,
"cpu_time": 3.9370046612913633e+01,
"time_unit": "ns"
},
{
"name": "fill_6d<normal, dynamic_tag, SStore>",
"run_name": "fill_6d<normal, dynamic_tag, SStore>",
"run_type": "iteration",
"repetitions": 0,
"repetition_index": 0,
"threads": 1,
"iterations": 11066494,
"real_time": 8.8299878443784166e+01,
"cpu_time": 8.7806671200472039e+01,
"time_unit": "ns"
},
{
"name": "fill_6d<normal, dynamic_tag, DStore>",
"run_name": "fill_6d<normal, dynamic_tag, DStore>",
"run_type": "iteration",
"repetitions": 0,
"repetition_index": 0,
"threads": 1,
"iterations": 8274819,
"real_time": 7.5901243036010413e+01,
"cpu_time": 7.5830903370817197e+01,
"time_unit": "ns"
}
]
}

88
doc/fill_gsl.json Normal file
View File

@ -0,0 +1,88 @@
{
"context": {
"date": "2019-06-03 22:33:28",
"host_name": "hfm-1608b",
"executable": "./benchmark/histogram_filling_gsl",
"num_cpus": 4,
"mhz_per_cpu": 2900,
"cpu_scaling_enabled": false,
"caches": [
{
"type": "Data",
"level": 1,
"size": 32768000,
"num_sharing": 2
},
{
"type": "Instruction",
"level": 1,
"size": 32768000,
"num_sharing": 2
},
{
"type": "Unified",
"level": 2,
"size": 262144000,
"num_sharing": 2
},
{
"type": "Unified",
"level": 3,
"size": 3145728000,
"num_sharing": 4
}
],
"load_avg": [2.18213,2.01025,1.92334],
"library_build_type": "release"
},
"benchmarks": [
{
"name": "fill_1d<uniform>",
"run_name": "fill_1d<uniform>",
"run_type": "iteration",
"repetitions": 0,
"repetition_index": 0,
"threads": 1,
"iterations": 93827491,
"real_time": 7.4210463860594267e+00,
"cpu_time": 7.4120920488004947e+00,
"time_unit": "ns"
},
{
"name": "fill_2d<uniform>",
"run_name": "fill_2d<uniform>",
"run_type": "iteration",
"repetitions": 0,
"repetition_index": 0,
"threads": 1,
"iterations": 40047370,
"real_time": 1.7006033155376219e+01,
"cpu_time": 1.6964709542724034e+01,
"time_unit": "ns"
},
{
"name": "fill_1d<normal>",
"run_name": "fill_1d<normal>",
"run_type": "iteration",
"repetitions": 0,
"repetition_index": 0,
"threads": 1,
"iterations": 81505286,
"real_time": 8.3697460800122077e+00,
"cpu_time": 8.3077556466705715e+00,
"time_unit": "ns"
},
{
"name": "fill_2d<normal>",
"run_name": "fill_2d<normal>",
"run_type": "iteration",
"repetitions": 0,
"repetition_index": 0,
"threads": 1,
"iterations": 40861834,
"real_time": 1.7504649522226590e+01,
"cpu_time": 1.7429369420863488e+01,
"time_unit": "ns"
}
]
}

View File

@ -1,53 +0,0 @@
1D-root-uniform 10.5
2D-root-uniform 8.2
3D-root-uniform 18.7
6D-root-uniform 20.4
1D-root-normal 11.5
2D-root-normal 8.9
3D-root-normal 17.4
6D-root-normal 21.4
1D-root-uniform 10.5
2D-root-uniform 8.0
3D-root-uniform 16.7
6D-root-uniform 18.1
1D-root-normal 11.4
2D-root-normal 8.8
3D-root-normal 17.3
6D-root-normal 20.5
1D-gsl-uniform 6.3
2D-gsl-uniform 6.8
1D-gsl-normal 6.8
2D-gsl-normal 7.1
baseline 0.8
1D-boost:SS-uniform 4.7
1D-boost:SD-uniform 10.6
1D-boost:DS-uniform 5.1
1D-boost:DD-uniform 11.5
2D-boost:SS-uniform 6.1
2D-boost:SD-uniform 8.2
2D-boost:DS-uniform 7.3
2D-boost:DD-uniform 9.2
3D-boost:SS-uniform 11.8
3D-boost:SD-uniform 8.1
3D-boost:DS-uniform 14.0
3D-boost:DD-uniform 9.2
6D-boost:SS-uniform 12.1
6D-boost:SD-uniform 7.7
6D-boost:DS-uniform 16.6
6D-boost:DD-uniform 11.4
1D-boost:SS-normal 5.7
1D-boost:SD-normal 11.6
1D-boost:DS-normal 6.3
1D-boost:DD-normal 12.6
2D-boost:SS-normal 6.8
2D-boost:SD-normal 9.1
2D-boost:DS-normal 8.4
2D-boost:DD-normal 10.7
3D-boost:SS-normal 11.6
3D-boost:SD-normal 8.7
3D-boost:DS-normal 14.7
3D-boost:DD-normal 10.0
6D-boost:SS-normal 13.8
6D-boost:SD-normal 9.9
6D-boost:DS-normal 18.2
6D-boost:DD-normal 13.9

View File

@ -2,6 +2,7 @@ import os
import numpy as np
import sys
import re
import json
from collections import defaultdict, OrderedDict
from matplotlib.patches import Rectangle
from matplotlib.lines import Line2D
@ -12,12 +13,18 @@ import matplotlib as mpl
mpl.rcParams.update(mpl.rcParamsDefault)
data = defaultdict(lambda:[])
for line in open(sys.argv[1]):
if line.startswith("baseline"):
continue
descr, time = [x for x in line.split() if x]
dim, label, dist = descr.split("-")
data[int(dim[0])].append((label, dist, float(time)))
for fn in sys.argv[1:]:
for bench in json.load(open(fn))["benchmarks"]:
name = bench["name"]
time = min(bench["cpu_time"], bench["real_time"])
m = re.match("fill_([0-9])d<([^>]+)>", name)
tags = m.group(2).split(", ")
dim = int(m.group(1))
label = re.search("fill_([a-z]+).json", fn).group(1)
dist = tags[0]
if label == "boost":
label += "-" + {"dynamic_tag":"D", "static_tag":"S"}[tags[1]] + tags[2][0]
data[dim].append((label, dist, time / dim))
plt.figure()
if os.path.exists("/proc/cpuinfo"):
@ -48,8 +55,10 @@ for dim in sorted(data):
col = "0.6"
if "gsl" in label:
col = "0.3"
r1 = Rectangle((0, i), t1, 0.5, facecolor=col)
r2 = Rectangle((0, i+0.5), t2, 0.5, facecolor=col)
tmin = min(t1, t2)
tmax = max(t1, t2)
r1 = Rectangle((0, i), tmin, 1, facecolor=col)
r2 = Rectangle((tmin, i+0.5), tmax-tmin, 0.5, facecolor=col)
plt.gca().add_artist(r1)
plt.gca().add_artist(r2)
tx = Text(-0.1, i+0.5, "%s" % label,
@ -63,10 +72,10 @@ for dim in sorted(data):
fontproperties=font0, va="center", ha="right", clip_on=False)
plt.gca().add_artist(tx)
plt.ylim(0, i)
plt.xlim(0, 30)
plt.xlim(0, 20)
plt.tick_params("y", left=False, labelleft=False)
plt.xlabel("fill time per random number in nanoseconds (smaller is better)")
plt.xlabel("fill time per random input value in nanoseconds (smaller is better)")
plt.savefig("fill_performance.svg")
plt.show()

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 50 KiB

136
doc/fill_root.json Normal file
View File

@ -0,0 +1,136 @@
{
"context": {
"date": "2019-06-03 22:33:49",
"host_name": "hfm-1608b",
"executable": "./benchmark/histogram_filling_root",
"num_cpus": 4,
"mhz_per_cpu": 2900,
"cpu_scaling_enabled": false,
"caches": [
{
"type": "Data",
"level": 1,
"size": 32768000,
"num_sharing": 2
},
{
"type": "Instruction",
"level": 1,
"size": 32768000,
"num_sharing": 2
},
{
"type": "Unified",
"level": 2,
"size": 262144000,
"num_sharing": 2
},
{
"type": "Unified",
"level": 3,
"size": 3145728000,
"num_sharing": 4
}
],
"load_avg": [2.11182,2.0083,1.92334],
"library_build_type": "release"
},
"benchmarks": [
{
"name": "fill_1d<uniform>",
"run_name": "fill_1d<uniform>",
"run_type": "iteration",
"repetitions": 0,
"repetition_index": 0,
"threads": 1,
"iterations": 55636361,
"real_time": 9.5863430571955472e+00,
"cpu_time": 9.5218305165573280e+00,
"time_unit": "ns"
},
{
"name": "fill_2d<uniform>",
"run_name": "fill_2d<uniform>",
"run_type": "iteration",
"repetitions": 0,
"repetition_index": 0,
"threads": 1,
"iterations": 43799000,
"real_time": 1.5803449599415702e+01,
"cpu_time": 1.5788305669079202e+01,
"time_unit": "ns"
},
{
"name": "fill_3d<uniform>",
"run_name": "fill_3d<uniform>",
"run_type": "iteration",
"repetitions": 0,
"repetition_index": 0,
"threads": 1,
"iterations": 16820939,
"real_time": 3.5477811732387629e+01,
"cpu_time": 3.5454263284588336e+01,
"time_unit": "ns"
},
{
"name": "fill_6d<uniform>",
"run_name": "fill_6d<uniform>",
"run_type": "iteration",
"repetitions": 0,
"repetition_index": 0,
"threads": 1,
"iterations": 9258035,
"real_time": 6.5875588502446192e+01,
"cpu_time": 6.5811049536969804e+01,
"time_unit": "ns"
},
{
"name": "fill_1d<normal>",
"run_name": "fill_1d<normal>",
"run_type": "iteration",
"repetitions": 0,
"repetition_index": 0,
"threads": 1,
"iterations": 53033115,
"real_time": 1.1722145663142236e+01,
"cpu_time": 1.1640557036862727e+01,
"time_unit": "ns"
},
{
"name": "fill_2d<normal>",
"run_name": "fill_2d<normal>",
"run_type": "iteration",
"repetitions": 0,
"repetition_index": 0,
"threads": 1,
"iterations": 41097660,
"real_time": 1.7116834291723340e+01,
"cpu_time": 1.7074402776216466e+01,
"time_unit": "ns"
},
{
"name": "fill_3d<normal>",
"run_name": "fill_3d<normal>",
"run_type": "iteration",
"repetitions": 0,
"repetition_index": 0,
"threads": 1,
"iterations": 21762650,
"real_time": 3.1504170172533939e+01,
"cpu_time": 3.1479530296172520e+01,
"time_unit": "ns"
},
{
"name": "fill_6d<normal>",
"run_name": "fill_6d<normal>",
"run_type": "iteration",
"repetitions": 0,
"repetition_index": 0,
"threads": 1,
"iterations": 8018511,
"real_time": 7.8335543968218118e+01,
"cpu_time": 7.8266775464921039e+01,
"time_unit": "ns"
}
]
}