Skip to content

Commit

Permalink
Merge branch 'lukego/branchmarks'
Browse files Browse the repository at this point in the history
  • Loading branch information
lukego committed Mar 18, 2017
2 parents e094845 + f333908 commit 96f816c
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
27 changes: 27 additions & 0 deletions bench/PARAM_x86_CI.txt
Original file line number Diff line number Diff line change
@@ -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
21 changes: 21 additions & 0 deletions bench/roulette.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
-- 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

-- (Let the test harness determine the random seed)
-- 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)))

0 comments on commit 96f816c

Please sign in to comment.