From b0a75b45a6d99e73472906cc668d1c7804f5147b Mon Sep 17 00:00:00 2001 From: Luke Gorrie Date: Sat, 8 Oct 2016 16:32:12 +0000 Subject: [PATCH 1/3] Added bench/roulette.lua This benchmark exhibits non-deterministic performance. --- bench/roulette.lua | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 bench/roulette.lua diff --git a/bench/roulette.lua b/bench/roulette.lua new file mode 100644 index 0000000000..77c9fbb2b5 --- /dev/null +++ b/bench/roulette.lua @@ -0,0 +1,20 @@ +-- Russian Roulette simulator +-- This benchmark includes randomness from an external source that can +-- produce non-deterministic performance. +-- See https://github.com/LuaJIT/LuaJIT/issues/218 + +math.randomseed(os.time()) + +local population = 100e6 +local live = 0 +local die = 0 + +for i = 1, population do + if math.random(6) == 6 then + die = die + 1 + else + live = live + 1 + end +end + +print(("Survived %d/%d (%.3f%%)"):format(live, population, live*100/(live+die))) From a71cd6d99cac83d71730860ca94b901385d6c46d Mon Sep 17 00:00:00 2001 From: Luke Gorrie Date: Sun, 9 Oct 2016 08:59:43 +0000 Subject: [PATCH 2/3] roulette: Stop seeding the random number generator The test harness shuold do this in some suitable way e.g. with values that are reproducible but still contain entropy for the JIT. --- bench/roulette.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bench/roulette.lua b/bench/roulette.lua index 77c9fbb2b5..968d42a744 100644 --- a/bench/roulette.lua +++ b/bench/roulette.lua @@ -3,7 +3,8 @@ -- produce non-deterministic performance. -- See https://github.com/LuaJIT/LuaJIT/issues/218 -math.randomseed(os.time()) +-- (Let the test harness determine the random seed) +-- math.randomseed(os.time()) local population = 100e6 local live = 0 From f333908a8699b2f5148b8f7bb621b7a5d8430788 Mon Sep 17 00:00:00 2001 From: Luke Gorrie Date: Mon, 17 Oct 2016 08:45:49 +0000 Subject: [PATCH 3/3] Added bench/PARAM_x86_CI.txt (CI params) This file specifies benchmarks to run for CI. This list is based on PARAM_x86.txt. I removed benchmarks that error and checked that everything runs for between 0.1s and 10s on the CI servers. Full run takes around 50s. --- bench/PARAM_x86_CI.txt | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 bench/PARAM_x86_CI.txt diff --git a/bench/PARAM_x86_CI.txt b/bench/PARAM_x86_CI.txt new file mode 100644 index 0000000000..0a90016863 --- /dev/null +++ b/bench/PARAM_x86_CI.txt @@ -0,0 +1,27 @@ +array3d 300 +binary-trees 16 +chameneos 1e7 +coroutine-ring 2e7 +euler14-bit 2e7 +fannkuch 11 +fasta 5e6 +life +mandelbrot 5000 +mandelbrot-bit 5000 +md5 20000 +nbody 5e6 +nsieve 12 +nsieve-bit 12 +nsieve-bit-fp 12 +partialsums 1e7 +pidigits-nogmp 5000 +ray 9 +recursive-ack 10 +recursive-fib 40 +scimark-fft 50000 +scimark-lu 5000 +scimark-sor 50000 +scimark-sparse 15e4 +series 10000 +spectral-norm 3000 +roulette