From: ts Date: 2001-11-03T02:06:07+09:00 Subject: [ruby-talk:24181] Re: Performance of Marshal.dump >>>>> "D" == Darrin Thompson writes: D> Could I get out of that "assignment" if instead I provide a simple D> program that duplicates the problem for me? pigeon% cat b.rb #!/usr/bin/ruby -v class MyData attr_accessor (:a, :b, :c, :d, :e) def initialize(a, b, c, d, e) @a=a @b=b @c=c @d=d @e=e end end array=Array.new (1..6000).each { | i | array.push( MyData.new(i, "zippy", "foo", "bar", "x")) } value=Marshal.dump(array) p value.length pigeon% pigeon% time b.rb ruby 1.6.5 (2001-09-19) [i686-linux] ruby 1.6.5 (2001-09-19) [i686-linux] ./b.rb:4: warning: attr_accessor (...) interpreted as method call 227645 real 1m10.694s user 1m10.620s sys 0m0.070s pigeon% pigeon% time ./ruby -v b.rb ruby 1.7.1 (2001-11-01) [i686-linux] b.rb:4: warning: attr_accessor (...) interpreted as method call mark stack overflow 227645 real 0m0.404s user 0m0.400s sys 0m0.000s pigeon% Guy Decoux