[前][次][番号順一覧][スレッド一覧]

ruby-changes:51716

From: k0kubun <ko1@a...>
Date: Tue, 10 Jul 2018 22:08:56 +0900 (JST)
Subject: [ruby-changes:51716] k0kubun:r63928 (trunk): benchmark: drop all bm_ prefix for legacy driver.rb

k0kubun	2018-07-10 22:08:40 +0900 (Tue, 10 Jul 2018)

  New Revision: 63928

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63928

  Log:
    benchmark: drop all bm_ prefix for legacy driver.rb
    
    benchmark/*.rb is only benchmarks now. We don't need prefixes.

  Added files:
    trunk/benchmark/app_answer.rb
    trunk/benchmark/app_aobench.rb
    trunk/benchmark/app_erb.rb
    trunk/benchmark/app_factorial.rb
    trunk/benchmark/app_fib.rb
    trunk/benchmark/app_lc_fizzbuzz.rb
    trunk/benchmark/app_mandelbrot.rb
    trunk/benchmark/app_pentomino.rb
    trunk/benchmark/app_raise.rb
    trunk/benchmark/app_strconcat.rb
    trunk/benchmark/app_tak.rb
    trunk/benchmark/app_tarai.rb
    trunk/benchmark/app_uri.rb
    trunk/benchmark/array_sample_100k_10.rb
    trunk/benchmark/array_sample_100k_11.rb
    trunk/benchmark/array_sample_100k__100.rb
    trunk/benchmark/array_sample_100k__1k.rb
    trunk/benchmark/array_sample_100k__6k.rb
    trunk/benchmark/array_sample_100k___10k.rb
    trunk/benchmark/array_sample_100k___50k.rb
    trunk/benchmark/array_shift.rb
    trunk/benchmark/array_small_and.rb
    trunk/benchmark/array_small_diff.rb
    trunk/benchmark/array_small_or.rb
    trunk/benchmark/array_sort_block.rb
    trunk/benchmark/array_sort_float.rb
    trunk/benchmark/array_values_at_int.rb
    trunk/benchmark/array_values_at_range.rb
    trunk/benchmark/bighash.rb
    trunk/benchmark/dir_empty_p.rb
    trunk/benchmark/erb_render.rb
    trunk/benchmark/file_chmod.rb
    trunk/benchmark/file_rename.rb
    trunk/benchmark/hash_aref_dsym.rb
    trunk/benchmark/hash_aref_dsym_long.rb
    trunk/benchmark/hash_aref_fix.rb
    trunk/benchmark/hash_aref_flo.rb
    trunk/benchmark/hash_aref_miss.rb
    trunk/benchmark/hash_aref_str.rb
    trunk/benchmark/hash_aref_sym.rb
    trunk/benchmark/hash_aref_sym_long.rb
    trunk/benchmark/hash_flatten.rb
    trunk/benchmark/hash_ident_flo.rb
    trunk/benchmark/hash_ident_num.rb
    trunk/benchmark/hash_ident_obj.rb
    trunk/benchmark/hash_ident_str.rb
    trunk/benchmark/hash_ident_sym.rb
    trunk/benchmark/hash_keys.rb
    trunk/benchmark/hash_long.rb
    trunk/benchmark/hash_shift.rb
    trunk/benchmark/hash_shift_u16.rb
    trunk/benchmark/hash_shift_u24.rb
    trunk/benchmark/hash_shift_u32.rb
    trunk/benchmark/hash_small2.rb
    trunk/benchmark/hash_small4.rb
    trunk/benchmark/hash_small8.rb
    trunk/benchmark/hash_to_proc.rb
    trunk/benchmark/hash_values.rb
    trunk/benchmark/int_quo.rb
    trunk/benchmark/io_copy_stream_write.rb
    trunk/benchmark/io_copy_stream_write_socket.rb
    trunk/benchmark/io_file_create.rb
    trunk/benchmark/io_file_read.rb
    trunk/benchmark/io_file_write.rb
    trunk/benchmark/io_nonblock_noex.rb
    trunk/benchmark/io_nonblock_noex2.rb
    trunk/benchmark/io_pipe_rw.rb
    trunk/benchmark/io_select.rb
    trunk/benchmark/io_select2.rb
    trunk/benchmark/io_select3.rb
    trunk/benchmark/loop_for.rb
    trunk/benchmark/loop_generator.rb
    trunk/benchmark/loop_times.rb
    trunk/benchmark/loop_whileloop.rb
    trunk/benchmark/loop_whileloop2.rb
    trunk/benchmark/marshal_dump_flo.rb
    trunk/benchmark/marshal_dump_load_geniv.rb
    trunk/benchmark/marshal_dump_load_time.rb
    trunk/benchmark/securerandom.rb
    trunk/benchmark/so_ackermann.rb
    trunk/benchmark/so_array.rb
    trunk/benchmark/so_binary_trees.rb
    trunk/benchmark/so_concatenate.rb
    trunk/benchmark/so_exception.rb
    trunk/benchmark/so_fannkuch.rb
    trunk/benchmark/so_fasta.rb
    trunk/benchmark/so_lists.rb
    trunk/benchmark/so_mandelbrot.rb
    trunk/benchmark/so_matrix.rb
    trunk/benchmark/so_meteor_contest.rb
    trunk/benchmark/so_nbody.rb
    trunk/benchmark/so_nested_loop.rb
    trunk/benchmark/so_nsieve.rb
    trunk/benchmark/so_nsieve_bits.rb
    trunk/benchmark/so_object.rb
    trunk/benchmark/so_partial_sums.rb
    trunk/benchmark/so_pidigits.rb
    trunk/benchmark/so_random.rb
    trunk/benchmark/so_sieve.rb
    trunk/benchmark/so_spectralnorm.rb
    trunk/benchmark/string_index.rb
    trunk/benchmark/string_scan_re.rb
    trunk/benchmark/string_scan_str.rb
    trunk/benchmark/time_subsec.rb
    trunk/benchmark/vm3_backtrace.rb
    trunk/benchmark/vm3_clearmethodcache.rb
    trunk/benchmark/vm3_gc.rb
    trunk/benchmark/vm3_gc_old_full.rb
    trunk/benchmark/vm3_gc_old_immediate.rb
    trunk/benchmark/vm3_gc_old_lazy.rb
    trunk/benchmark/vm_symbol_block_pass.rb
    trunk/benchmark/vm_thread_alive_check1.rb
    trunk/benchmark/vm_thread_close.rb
    trunk/benchmark/vm_thread_condvar1.rb
    trunk/benchmark/vm_thread_condvar2.rb
    trunk/benchmark/vm_thread_create_join.rb
    trunk/benchmark/vm_thread_mutex1.rb
    trunk/benchmark/vm_thread_mutex2.rb
    trunk/benchmark/vm_thread_mutex3.rb
    trunk/benchmark/vm_thread_pass.rb
    trunk/benchmark/vm_thread_pass_flood.rb
    trunk/benchmark/vm_thread_pipe.rb
    trunk/benchmark/vm_thread_queue.rb
    trunk/benchmark/vm_thread_sized_queue.rb
    trunk/benchmark/vm_thread_sized_queue2.rb
    trunk/benchmark/vm_thread_sized_queue3.rb
    trunk/benchmark/vm_thread_sized_queue4.rb
  Removed files:
    trunk/benchmark/bm_app_answer.rb
    trunk/benchmark/bm_app_aobench.rb
    trunk/benchmark/bm_app_erb.rb
    trunk/benchmark/bm_app_factorial.rb
    trunk/benchmark/bm_app_fib.rb
    trunk/benchmark/bm_app_lc_fizzbuzz.rb
    trunk/benchmark/bm_app_mandelbrot.rb
    trunk/benchmark/bm_app_pentomino.rb
    trunk/benchmark/bm_app_raise.rb
    trunk/benchmark/bm_app_strconcat.rb
    trunk/benchmark/bm_app_tak.rb
    trunk/benchmark/bm_app_tarai.rb
    trunk/benchmark/bm_app_uri.rb
    trunk/benchmark/bm_array_sample_100k_10.rb
    trunk/benchmark/bm_array_sample_100k_11.rb
    trunk/benchmark/bm_array_sample_100k__100.rb
    trunk/benchmark/bm_array_sample_100k__1k.rb
    trunk/benchmark/bm_array_sample_100k__6k.rb
    trunk/benchmark/bm_array_sample_100k___10k.rb
    trunk/benchmark/bm_array_sample_100k___50k.rb
    trunk/benchmark/bm_array_shift.rb
    trunk/benchmark/bm_array_small_and.rb
    trunk/benchmark/bm_array_small_diff.rb
    trunk/benchmark/bm_array_small_or.rb
    trunk/benchmark/bm_array_sort_block.rb
    trunk/benchmark/bm_array_sort_float.rb
    trunk/benchmark/bm_array_values_at_int.rb
    trunk/benchmark/bm_array_values_at_range.rb
    trunk/benchmark/bm_bighash.rb
    trunk/benchmark/bm_dir_empty_p.rb
    trunk/benchmark/bm_erb_render.rb
    trunk/benchmark/bm_file_chmod.rb
    trunk/benchmark/bm_file_rename.rb
    trunk/benchmark/bm_hash_aref_dsym.rb
    trunk/benchmark/bm_hash_aref_dsym_long.rb
    trunk/benchmark/bm_hash_aref_fix.rb
    trunk/benchmark/bm_hash_aref_flo.rb
    trunk/benchmark/bm_hash_aref_miss.rb
    trunk/benchmark/bm_hash_aref_str.rb
    trunk/benchmark/bm_hash_aref_sym.rb
    trunk/benchmark/bm_hash_aref_sym_long.rb
    trunk/benchmark/bm_hash_flatten.rb
    trunk/benchmark/bm_hash_ident_flo.rb
    trunk/benchmark/bm_hash_ident_num.rb
    trunk/benchmark/bm_hash_ident_obj.rb
    trunk/benchmark/bm_hash_ident_str.rb
    trunk/benchmark/bm_hash_ident_sym.rb
    trunk/benchmark/bm_hash_keys.rb
    trunk/benchmark/bm_hash_long.rb
    trunk/benchmark/bm_hash_shift.rb
    trunk/benchmark/bm_hash_shift_u16.rb
    trunk/benchmark/bm_hash_shift_u24.rb
    trunk/benchmark/bm_hash_shift_u32.rb
    trunk/benchmark/bm_hash_small2.rb
    trunk/benchmark/bm_hash_small4.rb
    trunk/benchmark/bm_hash_small8.rb
    trunk/benchmark/bm_hash_to_proc.rb
    trunk/benchmark/bm_hash_values.rb
    trunk/benchmark/bm_int_quo.rb
    trunk/benchmark/bm_io_copy_stream_write.rb
    trunk/benchmark/bm_io_copy_stream_write_socket.rb
    trunk/benchmark/bm_io_file_create.rb
    trunk/benchmark/bm_io_file_read.rb
    trunk/benchmark/bm_io_file_write.rb
    trunk/benchmark/bm_io_nonblock_noex.rb
    trunk/benchmark/bm_io_nonblock_noex2.rb
    trunk/benchmark/bm_io_pipe_rw.rb
    trunk/benchmark/bm_io_select.rb
    trunk/benchmark/bm_io_select2.rb
    trunk/benchmark/bm_io_select3.rb
    trunk/benchmark/bm_loop_for.rb
    trunk/benchmark/bm_loop_generator.rb
    trunk/benchmark/bm_loop_times.rb
    trunk/benchmark/bm_loop_whileloop.rb
    trunk/benchmark/bm_loop_whileloop2.rb
    trunk/benchmark/bm_marshal_dump_flo.rb
    trunk/benchmark/bm_marshal_dump_load_geniv.rb
    trunk/benchmark/bm_marshal_dump_load_time.rb
    trunk/benchmark/bm_securerandom.rb
    trunk/benchmark/bm_so_ackermann.rb
    trunk/benchmark/bm_so_array.rb
    trunk/benchmark/bm_so_binary_trees.rb
    trunk/benchmark/bm_so_concatenate.rb
    trunk/benchmark/bm_so_exception.rb
    trunk/benchmark/bm_so_fannkuch.rb
    trunk/benchmark/bm_so_fasta.rb
    trunk/benchmark/bm_so_lists.rb
    trunk/benchmark/bm_so_mandelbrot.rb
    trunk/benchmark/bm_so_matrix.rb
    trunk/benchmark/bm_so_meteor_contest.rb
    trunk/benchmark/bm_so_nbody.rb
    trunk/benchmark/bm_so_nested_loop.rb
    trunk/benchmark/bm_so_nsieve.rb
    trunk/benchmark/bm_so_nsieve_bits.rb
    trunk/benchmark/bm_so_object.rb
    trunk/benchmark/bm_so_partial_sums.rb
    trunk/benchmark/bm_so_pidigits.rb
    trunk/benchmark/bm_so_random.rb
    trunk/benchmark/bm_so_sieve.rb
    trunk/benchmark/bm_so_spectralnorm.rb
    trunk/benchmark/bm_string_index.rb
    trunk/benchmark/bm_string_scan_re.rb
    trunk/benchmark/bm_string_scan_str.rb
    trunk/benchmark/bm_time_subsec.rb
    trunk/benchmark/bm_vm3_backtrace.rb
    trunk/benchmark/bm_vm3_clearmethodcache.rb
    trunk/benchmark/bm_vm3_gc.rb
    trunk/benchmark/bm_vm3_gc_old_full.rb
    trunk/benchmark/bm_vm3_gc_old_immediate.rb
    trunk/benchmark/bm_vm3_gc_old_lazy.rb
    trunk/benchmark/bm_vm_symbol_block_pass.rb
    trunk/benchmark/bm_vm_thread_alive_check1.rb
    trunk/benchmark/bm_vm_thread_close.rb
    trunk/benchmark/bm_vm_thread_condvar1.rb
    trunk/benchmark/bm_vm_thread_condvar2.rb
    trunk/benchmark/bm_vm_thread_create_join.rb
    trunk/benchmark/bm_vm_thread_mutex1.rb
    trunk/benchmark/bm_vm_thread_mutex2.rb
    trunk/benchmark/bm_vm_thread_mutex3.rb
    trunk/benchmark/bm_vm_thread_pass.rb
    trunk/benchmark/bm_vm_thread_pass_flood.rb
    trunk/benchmark/bm_vm_thread_pipe.rb
    trunk/benchmark/bm_vm_thread_queue.rb
    trunk/benchmark/bm_vm_thread_sized_queue.rb
    trunk/benchmark/bm_vm_thread_sized_queue2.rb
    trunk/benchmark/bm_vm_thread_sized_queue3.rb
    trunk/benchmark/bm_vm_thread_sized_queue4.rb
Index: benchmark/bm_vm_thread_sized_queue4.rb
===================================================================
--- benchmark/bm_vm_thread_sized_queue4.rb	(revision 63927)
+++ benchmark/bm_vm_thread_sized_queue4.rb	(nonexistent)
@@ -1,26 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/bm_vm_thread_sized_queue4.rb#L0
-require 'thread'
-# many producers, many consumers
-nr = 1_000_000
-n = 10
-m = 10
-q = Thread::SizedQueue.new(100)
-consumers = n.times.map do
-  Thread.new do
-    while q.pop
-      # consuming
-    end
-  end
-end
-
-producers = m.times.map do
-  Thread.new do
-    while nr > 0
-      q.push true
-      nr -= 1
-    end
-  end
-end
-
-producers.each(&:join)
-n.times { q.push nil }
-consumers.each(&:join)

Property changes on: benchmark/bm_vm_thread_sized_queue4.rb
___________________________________________________________________
Deleted: svn:eol-style
## -1 +0,0 ##
-LF
\ No newline at end of property
Index: benchmark/bm_hash_flatten.rb
===================================================================
--- benchmark/bm_hash_flatten.rb	(revision 63927)
+++ benchmark/bm_hash_flatten.rb	(nonexistent)
@@ -1,9 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/bm_hash_flatten.rb#L0
-h = {}
-
-10000.times do |i|
-  h[i] = nil
-end
-
-1000.times do
-  h.flatten
-end

Property changes on: benchmark/bm_hash_flatten.rb
___________________________________________________________________
Deleted: svn:eol-style
## -1 +0,0 ##
-LF
\ No newline at end of property
Index: benchmark/bm_hash_ident_obj.rb
===================================================================
--- benchmark/bm_hash_ident_obj.rb	(revision 63927)
+++ benchmark/bm_hash_ident_obj.rb	(nonexistent)
@@ -1,4 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/bm_hash_ident_obj.rb#L0
-h = {}.compare_by_identity
-objs = 26.times.map { Object.new }
-objs.each { |o| h[o] = o }
-200_000.times { objs.each { |o| h[o] } }

Property changes on: benchmark/bm_hash_ident_obj.rb
___________________________________________________________________
Deleted: svn:eol-style
## -1 +0,0 ##
-LF
\ No newline at end of property
Index: benchmark/bm_hash_small8.rb
===================================================================
--- benchmark/bm_hash_small8.rb	(revision 63927)
+++ benchmark/bm_hash_small8.rb	(nonexistent)
@@ -1 +0,0 @@
-1000000.times.map{|i| a={}; 8.times{|j| a[j]=j}; a}

Property changes on: benchmark/bm_hash_small8.rb
___________________________________________________________________
Deleted: svn:eol-style
## -1 +0,0 ##
-LF
\ No newline at end of property
Index: benchmark/bm_so_partial_sums.rb
===================================================================
--- benchmark/bm_so_partial_sums.rb	(revision 63927)
+++ benchmark/bm_so_partial_sums.rb	(nonexistent)
@@ -1,31 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/bm_so_partial_sums.rb#L0
-n = 2_500_000 # (ARGV.shift || 1).to_i
-
-alt = 1.0 ; s0 = s1 = s2 = s3 = s4 = s5 = s6 = s7 = s8 = 0.0
-
-1.upto(n) do |d|
-  d = d.to_f ; d2 = d * d ; d3 = d2 * d ; ds = Math.sin(d) ; dc = Math.cos(d)
-
-  s0 += (2.0 / 3.0) ** (d - 1.0)
-  s1 += 1.0 / Math.sqrt(d)
-  s2 += 1.0 / (d * (d + 1.0))
-  s3 += 1.0 / (d3 * ds * ds)
-  s4 += 1.0 / (d3 * dc * dc)
-  s5 += 1.0 / d
-  s6 += 1.0 / d2
-  s7 += alt / d
-  s8 += alt / (2.0 * d - 1.0)
-
-  alt = -alt
-end
-
-if false
-  printf("%.9f\t(2/3)^k\n", s0)
-  printf("%.9f\tk^-0.5\n", s1)
-  printf("%.9f\t1/k(k+1)\n", s2)
-  printf("%.9f\tFlint Hills\n", s3)
-  printf("%.9f\tCookson Hills\n", s4)
-  printf("%.9f\tHarmonic\n", s5)
-  printf("%.9f\tRiemann Zeta\n", s6)
-  printf("%.9f\tAlternating Harmonic\n", s7)
-  printf("%.9f\tGregory\n", s8)
-end

Property changes on: benchmark/bm_so_partial_sums.rb
___________________________________________________________________
Deleted: svn:eol-style
## -1 +0,0 ##
-LF
\ No newline at end of property
Index: benchmark/bm_app_pentomino.rb
===================================================================
--- benchmark/bm_app_pentomino.rb	(revision 63927)
+++ benchmark/bm_app_pentomino.rb	(nonexistent)
@@ -1,130 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/bm_app_pentomino.rb#L0
-#!/usr/local/bin/ruby
-# This program is contributed by Shin Nishiyama
-
-
-# modified by K.Sasada
-
-NP = 5
-ROW = 8 + NP
-COL = 8
-
-$p = []
-$b = []
-$no = 0
-
-def piece(n, a, nb)
-  nb.each{|x|
-    a[n] = x
-    if n == NP-1
-      $p << [a.sort]
-    else
-      nbc=nb.dup
-      [-ROW, -1, 1, ROW].each{|d|
-        if x+d > 0 and not a.include?(x+d) and not nbc.include?(x+d)
-          nbc << x+d
-        end
-      }
-      nbc.delete x
-      piece(n+1,a[0..n],nbc)
-    end
-  }
-end
-
-def kikaku(a)
-  a.collect {|x| x - a[0]}
-end
-def ud(a)
-  kikaku(a.collect {|x| ((x+NP)%ROW)-ROW*((x+NP)/ROW) }.sort)
-end
-def rl(a)
-  kikaku(a.collect {|x| ROW*((x+NP)/ROW)+ROW-((x+NP)%ROW)}.sort)
-end
-def xy(a)
-  kikaku(a.collect {|x| ROW*((x+NP)%ROW) + (x+NP)/ROW }.sort)
-end
-
-def mkpieces
-  piece(0,[],[0])
-  $p.each do |a|
-    a0 = a[0]
-    a[1] = ud(a0)
-    a[2] = rl(a0)
-    a[3] = ud(rl(a0))
-    a[4] = xy(a0)
-    a[5] = ud(xy(a0))
-    a[6] = rl(xy(a0))
-    a[7] = ud(rl(xy(a0)))
-    a.sort!
-    a.uniq!
-  end
-  $p.uniq!.sort! {|x,y| x[0] <=> y[0] }
-end
-
-def mkboard
-  (0...ROW*COL).each{|i|
-    if i % ROW >= ROW-NP
-      $b[i] = -2
-    else
-      $b[i] = -1
-    end
-    $b[3*ROW+3]=$b[3*ROW+4]=$b[4*ROW+3]=$b[4*ROW+4]=-2
-  }
-end
-
-def pboard
-  return # skip print
-  print "No. #$no\n"
-  (0...COL).each{|i|
-    print "|"
-    (0...ROW-NP).each{|j|
-      x = $b[i*ROW+j]
-      if x < 0
-        print "..|"
-      else
-        printf "%2d|",x+1
-      end
-    }
-    print "\n"
-  }
-  print "\n"
-end
-
-$pnum=[]
-def setpiece(a,pos)
-  if a.length == $p.length then
-    $no += 1
-    pboard
-    return
-  end
-  while $b[pos] != -1
-    pos += 1
-  end
-  ($pnum - a).each do |i|
-    $p[i].each do |x|
-      f = 0
-      x.each{|s|
-        if $b[pos+s] != -1
-          f=1
-          break
-        end
-      }
-      if f == 0 then
-        x.each{|s|
-          $b[pos+s] = i
-        }
-        a << i
-        setpiece(a.dup, pos)
-        a.pop
-        x.each{|s|
-          $b[pos+s] = -1
-        }
-      end
-    end
-  end
-end
-
-mkpieces
-mkboard
-$p[4] = [$p[4][0]]
-$pnum = (0...$p.length).to_a
-setpiece([],0)

Property changes on: benchmark/bm_app_pentomino.rb
___________________________________________________________________
Deleted: svn:eol-style
## -1 +0,0 ##
-LF
\ No newline at end of property
Index: benchmark/bm_array_sample_100k__6k.rb
===================================================================
--- benchmark/bm_array_sample_100k__6k.rb	(revision 63927)
+++ benchmark/bm_array_sample_100k__6k.rb	(nonexistent)
@@ -1,2 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/bm_array_sample_100k__6k.rb#L0
-arr = [*0...100000]
-10_000.times {arr.sample 6000}

Property changes on: benchmark/bm_array_sample_100k__6k.rb
___________________________________________________________________
Deleted: svn:eol-style
## -1 +0,0 ##
-LF
\ No newline at end of property
Index: benchmark/bm_vm_thread_sized_queue.rb
===================================================================
--- benchmark/bm_vm_thread_sized_queue.rb	(revision 63927)
+++ benchmark/bm_vm_thread_sized_queue.rb	(nonexistent)
@@ -1,20 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/bm_vm_thread_sized_queue.rb#L0
-require 'thread'
-# on producer, one consumer
-
-n = 1_000_000
-q = Thread::SizedQueue.new(100)
-consumer = Thread.new{
-  while q.pop
-    # consuming
-  end
-}
-
-producer = Thread.new{
-  while n > 0
-    q.push true
-    n -= 1
-  end
-  q.push nil
-}
-
-consumer.join

Property changes on: benchmark/bm_vm_thread_sized_queue.rb
___________________________________________________________________
Deleted: svn:eol-style
## -1 +0,0 ##
-LF
\ No newline at end of property
Index: benchmark/bm_vm3_gc_old_lazy.rb
===================================================================
--- benchmark/bm_vm3_gc_old_lazy.rb	(revision 63927)
+++ benchmark/bm_vm3_gc_old_lazy.rb	(nonexistent)
@@ -1,4 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/bm_vm3_gc_old_lazy.rb#L0
-old_object = Array.new(1_000_000){''}
-30_000.times do
-  GC.start(full_mark: false, immediate_sweep: false)
-end

Property changes on: benchmark/bm_vm3_gc_old_lazy.rb
___________________________________________________________________
Deleted: svn:eol-style
## -1 +0,0 ##
-LF
\ No newline at end of property
Index: benchmark/bm_so_nsieve_bits.rb
===================================================================
--- benchmark/bm_so_nsieve_bits.rb	(revision 63927)
+++ benchmark/bm_so_nsieve_bits.rb	(nonexistent)
@@ -1,43 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/bm_so_nsieve_bits.rb#L0
-#!/usr/bin/ruby
-#coding: us-ascii
-#
-# The Great Computer Language Shootout
-# http://shootout.alioth.debian.org/
-#
-# nsieve-bits in Ruby
-# Contributed by Glenn Parker, March 2005
-
-CharExponent = 3
-BitsPerChar = 1 << CharExponent
-LowMask = BitsPerChar - 1
-
-def sieve(m)
-  items = "\xFF" * ((m / BitsPerChar) + 1)
-  masks = ""
-  BitsPerChar.times do |b|
-    masks << (1 << b).chr
-  end
-
-  count = 0
-  pmax = m - 1
-  2.step(pmax, 1) do |p|
-    if items[p >> CharExponent][p & LowMask] == 1
-      count += 1
-      p.step(pmax, p) do |mult|
-	a = mult >> CharExponent
-	b = mult & LowMask
-	items[a] -= masks[b] if items[a][b] != 0
-      end
-    end
-  end
-  count
-end
-
-n = 9 # (ARGV[0] || 2).to_i
-n.step(n - 2, -1) do |exponent|
-  break if exponent < 0
-  m = 2 ** exponent * 10_000
-  count = sieve(m)
-  printf "Primes up to %8d %8d\n", m, count
-end
-

Property changes on: benchmark/bm_so_nsieve_bits.rb
___________________________________________________________________
Deleted: svn:eol-style
## -1 +0,0 ##
-LF
\ No newline at end of property
Index: benchmark/bm_so_nested_loop.rb
===================================================================
--- benchmark/bm_so_nested_loop.rb	(revision 63927)
+++ benchmark/bm_so_nested_loop.rb	(nonexistent)
@@ -1,24 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/bm_so_nested_loop.rb#L0
-#!/usr/bin/ruby
-# -*- mode: ruby -*-
-# $Id: nestedloop-ruby.code,v 1.4 2004/11/13 07:42:22 bfulgham Exp $
-# http://www.bagley.org/~doug/shootout/
-# from Avi Bryant
-
-n = 16 # Integer(ARGV.shift || 1)
-x = 0
-n.times do
-    n.times do
-        n.times do
-            n.times do
-                n.times do
-                    n.times do
-                        x += 1
-                    end
-                end
-            end
-        end
-    end
-end
-# puts x
-
-

Property changes on: benchmark/bm_so_nested_loop.rb
___________________________________________________________________
Deleted: svn:eol-style
## -1 +0,0 ##
-LF
\ No newline at end of property
Index: benchmark/bm_hash_aref_dsym.rb
===================================================================
--- benchmark/bm_hash_aref_dsym.rb	(revision 63927)
+++ benchmark/bm_hash_aref_dsym.rb	(nonexistent)
@@ -1,4 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/bm_hash_aref_dsym.rb#L0
-h = {}
-syms = ('a'..'z').map { |s| s.to_sym }
-syms.each { |s| h[s] = 1 }
-200_000.times { syms.each { |s| h[s] } }

Property changes on: benchmark/bm_hash_aref_dsym.rb
___________________________________________________________________
Deleted: svn:eol-style
## -1 +0,0 ##
-LF
\ No newline at end of property
Index: benchmark/bm_vm_thread_mutex3.rb
===================================================================
--- benchmark/bm_vm_thread_mutex3.rb	(revision 63927)
+++ benchmark/bm_vm_thread_mutex3.rb	(nonexistent)
@@ -1,20 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/bm_vm_thread_mutex3.rb#L0
-# 1000 threads, one mutex
-
-require 'thread'
-m = Thread::Mutex.new
-r = 0
-max = 2000
-(1..max).map{
-  Thread.new{
-    i = 0
-    while i<max
-      i += 1
-      m.synchronize{
-        r += 1
-      }
-    end
-  }
-}.each{|e|
-  e.join
-}
-raise r.to_s if r != max * max

Property changes on: benchmark/bm_vm_thread_mutex3.rb
___________________________________________________________________
Deleted: svn:eol-style
## -1 +0,0 ##
-LF
\ No newline at end of property
Index: benchmark/bm_io_file_write.rb
===================================================================
--- benchmark/bm_io_file_write.rb	(revision 63927)
+++ benchmark/bm_io_file_write.rb	(nonexistent)
@@ -1,14 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/bm_io_file_write.rb#L0
-#
-# Seek and Write file.
-#
-
-require 'tempfile'
-
-max = 200_000
-str = "Hello world!  " * 1000
-f = Tempfile.new('yarv-benchmark')
-
-max.times{
-  f.seek 0
-  f.write str
-}

Property changes on: benchmark/bm_io_file_write.rb
___________________________________________________________________
Deleted: svn:eol-style
## -1 +0,0 ##
-LF
\ No newline at end of property
Index: benchmark/bm_hash_ident_num.rb
===================================================================
--- benchmark/bm_hash_ident_num.rb	(revision 63927)
+++ benchmark/bm_hash_ident_num.rb	(nonexistent)
@@ -1,4 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/bm_hash_ident_num.rb#L0
-h = {}.compare_by_identity
-nums = (1..26).to_a
-nums.each { |n| h[n] = n }
-200_000.times { nums.each { |n| h[n] } }

Property changes on: benchmark/bm_hash_ident_num.rb
___________________________________________________________________
Deleted: svn:eol-style
## -1 +0,0 ##
-LF
\ No newline at end of property
Index: benchmark/bm_app_mandelbrot.rb
===================================================================
--- benchmark/bm_app_mandelbrot.rb	(revision 63927)
+++ benchmark/bm_app_mandelbrot.rb	(nonexistent)
@@ -1,23 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/bm_app_mandelbrot.rb#L0
-require 'complex'
-
-def mandelbrot? z
-  i = 0
-  while i<100
-    i += 1
-    z = z * z
-    return false if z.abs > 2
-  end
-  true
-end
-
-ary = []
-
-(0..1000).each{|dx|
-  (0..1000).each{|dy|
-    x = dx / 50.0
-    y = dy / 50.0
-    c = Complex(x, y)
-    ary << c if mandelbrot?(c)
-  }
-}
-

Property changes on: benchmark/bm_app_mandelbrot.rb
___________________________________________________________________
Deleted: svn:eol-style
## -1 +0,0 ##
-LF
\ No newline at end of property
Index: benchmark/bm_hash_aref_dsym_long.rb
===================================================================
--- benchmark/bm_hash_aref_dsym_long.rb	(revision 63927)
+++ benchmark/bm_hash_aref_dsym_long.rb	(nonexistent)
@@ -1,21 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/bm_hash_aref_dsym_long.rb#L0
-# [ruby-core:70129] [Bug #11396]
-collection_size = 200000
-sample_size = 10000
-
-values = (1..collection_size).to_a.map do |x|
-  "THIS IS A LONGER STRING THAT IS ALSO UNIQUE #{x}"
-end
-
-symbol_hash = {}
-
-values.each do |x|
-  symbol_hash[x.to_sym] = 1
-end
-
-# use the same samples each time to minimize deviations
-rng = Random.new(0)
-symbol_sample_array = values.sample(sample_size, random: rng).map(&:to_sym)
-
-3000.times do
-  symbol_sample_array.each { |x| symbol_hash[x] }
-end

Property changes on: benchmark/bm_hash_aref_dsym_long.rb
___________________________________________________________________
Deleted: svn:eol-style
## -1 +0,0 ##
-LF
\ No newline at end of property
Index: benchmark/bm_vm3_gc_old_full.rb
===================================================================
--- benchmark/bm_vm3_gc_old_full.rb	(revision 63927)
+++ benchmark/bm_vm3_gc_old_full.rb	(nonexistent)
@@ -1,4 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/bm_vm3_gc_old_full.rb#L0
-old_object = Array.new(1_000_000){''}
-100.times do
-  GC.start
-end

Property changes on: benchmark/bm_vm3_gc_old_full.rb
___________________________________________________________________
Deleted: svn:eol-style
## -1 +0,0 ##
-LF
\ No newline at end of property
Index: benchmark/bm_so_exception.rb
===================================================================
--- benchmark/bm_so_exception.rb	(revision 63927)
+++ benchmark/bm_so_exception.rb	(nonexistent)
@@ -1,61 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/bm_so_exception.rb#L0
-#!/usr/bin/ruby
-# -*- mode: ruby -*-
-# $Id: except-ruby.code,v 1.4 2004/11/13 07:41:33 bfulgham Exp $
-# http://www.bagley.org/~doug/shootout/
-
-$HI = 0
-$LO = 0
-NUM = 250000 # Integer(ARGV[0] || 1)
-
-
-class Lo_Exception < Exception
-  def initialize(num)
-    @value = num
-  end
-end
-
-class Hi_Exception < Exception
-  def initialize(num)
-    @value = num
-  end
-end
-
-def some_function(num)
-  begin
-    hi_function(num)
-  rescue
-    print "We shouldn't get here, exception is: #{$!.type}\n"
-  end
-end
-
-def hi_function(num)
-  begin
-    lo_function(num)
-  rescue Hi_Exception
-    $HI = $HI + 1
-  end
-end
-
-def lo_function(num)
-  begin
-    blowup(num)
-  rescue Lo_Exception
-    $LO = $LO + 1
-  end
-end
-
-def blowup(num)
-  if num % 2 == 0
-    raise Lo_Exception.new(num)
-  else
-    raise Hi_Exception.new(num)
-  end
-end
-
-
-i = 1
-max = NUM+1
-while i < max
-  i += 1
-  some_function(i+1)
-end

Property changes on: benchmark/bm_so_exception.rb
___________________________________________________________________
Deleted: svn:eol-style
## -1 +0,0 ##
-LF
\ No newline at end of property
Index: benchmark/bm_array_small_or.rb
===================================================================
--- benchmark/bm_array_small_or.rb	(revision 63927)
+++ benchmark/bm_array_small_or.rb	(nonexistent)
@@ -1,17 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/bm_array_small_or.rb#L0
-MIN_SIZE = ENV.fetch('SMALL_ARRAY_MIN', 0).to_i
-MAX_SIZE = ENV.fetch('SMALL_ARRAY_MAX', 16).to_i
-ITERATIONS = ENV.fetch('SMALL_ARRAY_ITERATIONS', 100).to_i
-
-ARRAYS = (MIN_SIZE..MAX_SIZE).map do |size1|
-  (MIN_SIZE..MAX_SIZE).map do |size2|
-    [Array.new(size1) { rand(MAX_SIZE) }, Array.new(size2) { rand(MAX_SIZE) }]
-  end
-end
-
-ITERATIONS.times do
-  ARRAYS.each do |group|
-    group.each do |arr1, arr2|
-      arr1 | arr2
-    end
-  end
-end

Property changes on: benchmark/bm_array_small_or.rb
___________________________________________________________________
Deleted: svn:eol-style
## -1 +0,0 ##
-LF
\ No newline at end of property
Index: benchmark/bm_erb_render.rb
===================================================================
--- benchmark/bm_erb_render.rb	(revision 63927)
+++ benchmark/bm_erb_render.rb	(nonexistent)
@@ -1,25 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/bm_erb_render.rb#L0
-require 'erb'
-
-data = <<erb
-<html>
-  <head> <%= title %> </head>
-  <body>
-    <h1> <%= title %> </h1>
-    <p>
-      <%= content %>
-    </p>
-  </body>
-</html>
-erb
-
-max = 1_500_000
-title = "hello world!"
-content = "hello world!\n" * 10
-
-src = "def self.render(title, content); #{ERB.new(data).src}; end"
-mod = Module.new
-mod.instance_eval(src, "(ERB)")
-
-max.times do
-  mod.render(title, content)
-end

Property changes on: benchmark/bm_erb_render.rb
___________________________________________________________________
Deleted: svn:eol-style
## -1 +0,0 ##
-LF
\ No newline at end of property
Index: benchmark/bm_hash_shift_u32.rb
===================================================================
--- benchmark/bm_hash_shift_u32.rb	(revision 63927)
+++ benchmark/bm_hash_shift_u32.rb	(nonexistent)
@@ -1,10 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/bm_hash_shift_u32.rb#L0
-h = {}
-
-(0xffff4000..0xffffffff).each do |i|
-  h[i] = nil
-end
-
-300000.times do
-  k, v = h.shift
-  h[k] = v
-end

Property changes on: benchmark/bm_hash_shift_u32.rb
___________________________________________________________________
Deleted: svn:eol-style
## -1 +0,0 ##
-LF
\ No newline at end of property
Index: benchmark/bm_vm_thread_create_join.rb
===================================================================
--- benchmark/bm_vm_thread_create_join.rb	(revision 63927)
 (... truncated)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]