yarv-dev-en:54
From: Ilmari Heikkinen <kig misfiring.net>
Date: Wed, 22 Feb 2006 17:58:09 +0200
Subject: [yarv-dev-en:54] Re: YARV 0.3.3 bug report
Hi, On Wed, 2006-02-22 at 18:28 +0900, SASADA Koichi wrote: > >> 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? Yes, YARV's GC is faster. Actually, the ruby1.8 version was using RubyInline to do the bottlenecks in C (forgot to turn it off), and that's why it's allocating less. YARV is running pure ruby codepath, so the performance is even more impressive. I re-ran the test with inline turned off and ruby1.8 gets 34fps, YARV gets 60fps (76% faster!) > I hope to see function level profiler (e.g. gprof). I'll try. > > 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] > > > kig@bauhaus:~$ ruby-yarv -e 'class Object; define_method(:foo){|*args| p > > args}; end; 0.foo(1,2,3)' > > 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] Strange.. Tried the SVN trunk HEAD: $ svn co http://www.atdot.net/svn/yarv/trunk yarv $ cd yarv; autoconf && ./configure --program-suffix=-yarv && make $ ./ruby-yarv -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: 470 (2006-02-22) [opts: ] 1 nil What might be the reason ? Bad libraries on my machine? I'll paste some things (hopefully helpful) Are there other things I could run that would help with debugging this? $ ruby-yarv -e 'p $LOADED_FEATURES' ["enumerator.so"] yarv$ make test not ok assignment 107 -- ./sample/test.rb:157:in `block in <main>' not ok assignment 118 -- ./sample/test.rb:169:in `block in <main>' not ok assignment 142 -- ./sample/test.rb:196:in `block in <main>' not ok assignment 206 -- ./sample/test.rb:269:in `block in <main>' not ok assignment 214 -- ./sample/test.rb:283:in `<main>' not ok assignment 215 -- ./sample/test.rb:284:in `<main>' not ok assignment 216 -- ./sample/test.rb:285:in `<main>' not ok iterator 16 -- ./sample/test.rb:956:in `<main>' not ok iterator 17 -- ./sample/test.rb:958:in `<main>' not ok iterator 47 -- ./sample/test.rb:1032:in `<main>' not ok iterator 49 -- ./sample/test.rb:1034:in `<main>' not ok iterator 50 -- ./sample/test.rb:1035:in `<main>' not ok iterator 58 -- ./sample/test.rb:1049:in `<main>' not ok iterator 60 -- ./sample/test.rb:1051:in `<main>' not ok iterator 75 -- ./sample/test.rb:1109:in `<main>' not ok iterator 80 -- ./sample/test.rb:1152:in `<main>' not ok iterator 81 -- ./sample/test.rb:1159:in `<main>' not ok iterator 86 -- ./sample/test.rb:1228:in `<main>' not ok iterator 88 -- ./sample/test.rb:1246:in `<main>' not ok iterator 91 -- ./sample/test.rb:1266:in `<main>' not ok iterator 92 -- ./sample/test.rb:1267:in `<main>' test failed make: *** [test] Error 1 $ lsof -p [yarv pid] [...] /lib/tls/libc-2.3.5.so /lib/tls/libm-2.3.5.so /lib/tls/libcrypt-2.3.5.so /lib/tls/libdl-2.3.5.so /lib/tls/libpthread-2.3.5.so /lib/ld-2.3.5.so [...] $ ./ruby-yarv -e 'p lambda{|*a|}.arity' 0 $ ./ruby-yarv -e 'p lambda{|x,*a|}.arity' -2 $ ./ruby-yarv -e 'p lambda{|x,y,*a|}.arity' 2 $ ./ruby-yarv -e 'p lambda{|x,y,z,*a|}.arity' 3 $ ./ruby-yarv -e 'p lambda{|x,y,z,xx,*a|}.arity' 4 -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 ]