[前][次][番号順一覧][スレッド一覧][生データ]

yarv-dev-en:53

From: SASADA Koichi <ko1 atdot.net>
Date: Wed, 22 Feb 2006 18:28:01 +0900
Subject: [yarv-dev-en:53] Re: YARV 0.3.3 bug report

Hi,

Ilmari Heikkinen wrote:
>>> 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

On my environment:
$ ./ruby -ve 'for d,*f in [[1,2,3]]; p d,f; end'
ruby 2.0.0 (Base: Ruby 1.9.0 2006-02-14) [i686-linux]
YARVCore 0.4.0 Rev: 717 (2006-02-22) [opts: ]
1
[2, 3]


>>> 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

On my environment:
$ ./ruby -ve 'class Object; define_method(:foo){|*args| p args}; end;
0.foo(1,2,3)'
ruby 2.0.0 (Base: Ruby 1.9.0 2006-02-14) [i686-linux]
YARVCore 0.4.0 Rev: 717 (2006-02-22) [opts: ]
[1, 2, 3]


>> 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

Interesting data.  Thanks!
But I can't understand what each data say.
It seems that GC on YARV more faster than Ruby 1.8, isn't it?


> 
> 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?)

not boxed.

>  GC run every 30 frames, freeing 4600 arrays and 40380 floats

I hope to see function level profiler (e.g. gprof).



Thanks,
-- 
// SASADA Koichi at atdot dot net


-- 
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       ]