summaryrefslogtreecommitdiffhomepage
path: root/benchmark
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2015-04-27 00:54:36 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2015-04-27 00:54:36 +0900
commitf1164487e1427c40e3a10ef0902a5905acc5f08a (patch)
tree68cad329ff30c6cb8a8ddf9a7db3f355057f6546 /benchmark
parentbdb9d4d19c3120666aae2ae24602f2d5dec19bbd (diff)
parented3a25337226015ba0356a9027e0e4965b5788b3 (diff)
downloadmruby-f1164487e1427c40e3a10ef0902a5905acc5f08a.tar.gz
mruby-f1164487e1427c40e3a10ef0902a5905acc5f08a.zip
Merge branch 'master' of github.com:mruby/mruby
Diffstat (limited to 'benchmark')
-rw-r--r--benchmark/bm_ao_render.rb (renamed from benchmark/ao-render.rb)4
-rw-r--r--benchmark/bm_fib.rb (renamed from benchmark/fib39.rb)3
-rw-r--r--benchmark/bm_so_lists.rb2
-rw-r--r--benchmark/build_config_boxing.rb28
-rw-r--r--benchmark/build_config_cc.rb13
-rw-r--r--benchmark/plot.gpl5
6 files changed, 50 insertions, 5 deletions
diff --git a/benchmark/ao-render.rb b/benchmark/bm_ao_render.rb
index 37bb4ad31..8212c3a13 100644
--- a/benchmark/ao-render.rb
+++ b/benchmark/bm_ao_render.rb
@@ -5,8 +5,8 @@
# mruby version by Hideki Miura
#
-IMAGE_WIDTH = 256
-IMAGE_HEIGHT = 256
+IMAGE_WIDTH = 64
+IMAGE_HEIGHT = 64
NSUBSAMPLES = 2
NAO_SAMPLES = 8
diff --git a/benchmark/fib39.rb b/benchmark/bm_fib.rb
index d5565b779..4b395f9cc 100644
--- a/benchmark/fib39.rb
+++ b/benchmark/bm_fib.rb
@@ -1,8 +1,7 @@
-# Fib 39
def fib n
return n if n < 2
fib(n-2) + fib(n-1)
end
-puts fib(39)
+puts fib(37)
diff --git a/benchmark/bm_so_lists.rb b/benchmark/bm_so_lists.rb
index f8d26797a..e8f4a2a5f 100644
--- a/benchmark/bm_so_lists.rb
+++ b/benchmark/bm_so_lists.rb
@@ -40,7 +40,7 @@ end
i = 0
while i<NUM
- i+=1
+ i += 1
result = test_lists()
end
diff --git a/benchmark/build_config_boxing.rb b/benchmark/build_config_boxing.rb
new file mode 100644
index 000000000..b478c9005
--- /dev/null
+++ b/benchmark/build_config_boxing.rb
@@ -0,0 +1,28 @@
+MRuby::Build.new do |conf|
+ toolchain :gcc
+end
+
+MRuby::Build.new('no_boxing') do |conf|
+ toolchain :gcc
+
+ conf.gembox 'default'
+end
+
+MRuby::Build.new('word_boxing') do |conf|
+ toolchain :gcc
+
+ conf.gembox 'default'
+ conf.compilers.each do |c|
+ c.defines += %w(MRB_WORD_BOXING)
+ end
+end
+
+MRuby::Build.new('nan_boxing') do |conf|
+ toolchain :gcc
+
+ conf.gembox 'default'
+ conf.compilers.each do |c|
+ c.defines += %w(MRB_NAN_BOXING)
+ end
+end
+
diff --git a/benchmark/build_config_cc.rb b/benchmark/build_config_cc.rb
new file mode 100644
index 000000000..56d725bc7
--- /dev/null
+++ b/benchmark/build_config_cc.rb
@@ -0,0 +1,13 @@
+MRuby::Build.new do |conf|
+ toolchain :gcc
+end
+
+MRuby::Build.new('gcc') do |conf|
+ toolchain :gcc
+ conf.gembox 'default'
+end
+
+MRuby::Build.new('clang') do |conf|
+ toolchain :clang
+ conf.gembox 'default'
+end
diff --git a/benchmark/plot.gpl b/benchmark/plot.gpl
new file mode 100644
index 000000000..725e2ec1c
--- /dev/null
+++ b/benchmark/plot.gpl
@@ -0,0 +1,5 @@
+set yrange [0:]
+set terminal pngcairo font 'Sans, 8' lw 1 size 1400,1024
+set xtics rotate by -45
+set style histogram errorbars gap 2 lw 1
+set style fill solid border -1