yarv-dev-en:51
From: Ilmari Heikkinen <kig misfiring.net>
Date: Wed, 22 Feb 2006 08:26:46 +0200
Subject: [yarv-dev-en:51] Re: YARV 0.3.3 bug report
On Mon, 2006-02-20 at 16:28 +0900, SASADA Koichi wrote: > Please teach your YARV's revision. Before it was the 0.3.3 tarball Updated to the 0.4.0 tarball now (congratulations on 0.4.0 btw!) kig@bauhaus:~$ uname -a Linux bauhaus 2.6.15 #1 PREEMPT Thu Jan 12 20:04:01 EET 2006 i686 GNU/Linux kig@bauhaus:~$ ruby-yarv -v ruby 2.0.0 (Base: Ruby 1.9.0 2006-02-14) [i686-linux] YARVCore 0.4.0 Rev: 466 (2006-02-22) [opts: ] > > 1. found when compiling rubysdl, mkmf.rb contains code like: > > > > for d,*f in [[1,2,3]] > > ... > > > > kig@bauhaus:~$ ruby1.8 -e 'for d,*f in [[1,2,3]]; p d,f; end' > > 1 > > [2, 3] > > > > kig@bauhaus:~$ ruby1.9 -e 'for d,*f in [[1,2,3]]; p d,f; end' > > [1, 2, 3] > > nil > > > Maybe I fixed it. broken in another way kig@bauhaus:~$ ruby-yarv -e 'for d,*f in [[1,2,3]]; p d,f; end' 1 nil > > > > 2. had some incompletely arg'd blocks in my code and ran into: > > > > kig@bauhaus:~$ ruby1.8 -e '[[1,2,3]].map{|a,b| p [a,b]}' > > [1, 2] > > > > kig@bauhaus:~$ ruby1.9 -e '[[1,2,3]].map{|a,b| p [a,b]}' > > [2, 3] > > ditto this works with 466 > > > 3. define_method has bug with splat args > > > > kig@bauhaus:~$ ruby1.8 -e 'class Object; define_method(:foo){|*args| > > p args}; end; 0.foo(1,2,3)' > > [1, 2, 3] > > > > kig@bauhaus:~$ ruby1.9 -e 'class Object; define_method(:foo){|*args| > > p args}; end; 0.foo(1,2,3)' > > -e:1:in `<main>': wrong number of arguments (3 for 0) (ArgumentError) > > ditto. broken in another way kig@bauhaus:~$ ruby-yarv -e 'class Object; define_method(:foo){|*args| p args}; end; 0.foo(1,2,3)' nil actually, kig@bauhaus:~$ ruby-yarv -e 'p lambda{|*a| a}[1]' nil > > > 4. method_missing and blocks > > > > kig@bauhaus:~$ ruby1.8 -e 'def method_missing(m,&b) b end; p f{}' > > #<Proc:0x00000000@-e:1> > > > > kig@bauhaus:~$ ruby1.9 -e 'def method_missing(m,&b) b end; p f{}' > > nil > > > ditto this works with 466 > > x. YARV GC runs take longer than Ruby1.8 GC runs (not really a bug) > > (ruby1.8 GC run: 45fps -> 17fps, YARV GC run: 60fps -> 10fps) > It's a valuable information. > BTW, do you have profiler? If you have it, please check bottleneck of > GC. I probably have some profiler, but don't know how to use it :I rev 466 doesn't seem to have the problem anymore; now the GC run frames are 25fps. Stats with the test scene: Athlon XP 1733MHz ruby1.8: normal fps: ~45 GC run fps: ~17 GC run time: ~0.037s allocs per frame: Arrays: ~250 Floats: ~390 GC run every 10 frames, freeing 2370 arrays and 3650 floats ruby-yarv: normal fps: ~60 GC run fps: ~25 GC run time: ~0.023s allocs per frame: Arrays: ~140 Floats: ~1400 (are floats primitives in YARV or boxed?) GC run every 30 frames, freeing 4600 arrays and 40380 floats > Thanks, > -- > // SASADA Koichi at atdot dot net > > Likewise, -Ilmari -- ML: yarv-dev-en quickml.atdot.net 使い方: http://www.atdot.net/~ko1/quickml
38 2006-02-18 12:33 [kig misfiring.net ] YARV 0.3.3 bug report 42 2006-02-20 16:28 ┗[ko1 atdot.net ] 46 2006-02-21 02:22 ┣[ko1 atdot.net ] -> 51 2006-02-22 15:26 ┗[kig misfiring.net ] 53 2006-02-22 18:28 ┗[ko1 atdot.net ] 54 2006-02-23 00:58 ┗[kig misfiring.net ] 57 2006-02-23 01:41 ┗[ko1 atdot.net ] 58 2006-02-23 01:50 ┗[kig misfiring.net ] 60 2006-02-23 02:26 ┗[ko1 atdot.net ] 61 2006-02-23 02:48 ┗[chneukirchen gmail.c] 62 2006-02-23 03:09 ┗[kig misfiring.net ] 63 2006-02-23 04:26 ┣[kig misfiring.net ] 64 2006-02-23 12:32 ┗[kig misfiring.net ] 68 2006-02-24 07:19 ┗[ko1 atdot.net ] 83 2006-02-27 22:24 ┗[ko1 atdot.net ]