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

ruby-changes:29424

From: nobu <ko1@a...>
Date: Thu, 20 Jun 2013 16:03:25 +0900 (JST)
Subject: [ruby-changes:29424] nobu:r41476 (trunk): * properties.

nobu	2013-06-20 16:03:15 +0900 (Thu, 20 Jun 2013)

  New Revision: 41476

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=41476

  Log:
    * properties.

  Modified files:
    trunk/benchmark/gc/redblack.rb
    trunk/benchmark/gc/ring.rb

Index: benchmark/gc/ring.rb
===================================================================
--- benchmark/gc/ring.rb	(revision 41475)
+++ benchmark/gc/ring.rb	(revision 41476)
@@ -1,29 +1,29 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/gc/ring.rb#L1
-# create many old objects
-
-max = 30_000_000
-
-class Ring
-  attr_reader :next_ring
-  def initialize n = nil
-    @next_ring = n
-  end
-  
-
-  def size
-    s = 1
-    ring = self
-    while ring.next_ring
-      s += 1
-      ring = ring.next_ring
-    end
-    s
-  end
-end
-
-ring = Ring.new
-
-max.times{
-  ring = Ring.new(ring)
-}
-
-# p ring.size
+# create many old objects
+
+max = 30_000_000
+
+class Ring
+  attr_reader :next_ring
+  def initialize n = nil
+    @next_ring = n
+  end
+  
+
+  def size
+    s = 1
+    ring = self
+    while ring.next_ring
+      s += 1
+      ring = ring.next_ring
+    end
+    s
+  end
+end
+
+ring = Ring.new
+
+max.times{
+  ring = Ring.new(ring)
+}
+
+# p ring.size

Property changes on: benchmark/gc/ring.rb
___________________________________________________________________
Added: svn:eol-style
   + LF


Property changes on: benchmark/gc/redblack.rb
___________________________________________________________________
Added: svn:eol-style
   + LF


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

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