Re: Projects, which use JSR292

2011-02-28 Thread Christian Thalinger
On Feb 21, 2011, at 9:17 PM, Charles Oliver Nutter wrote: > On Mon, Feb 21, 2011 at 10:08 AM, Christian Thalinger > wrote: >> On Feb 21, 2011, at 4:43 PM, Christian Thalinger wrote: >>> I fixed that but it didn't change performance. I just tried bench_tak and >>> there is still a regression. I

Re: Projects, which use JSR292

2011-02-21 Thread Charles Oliver Nutter
On Mon, Feb 21, 2011 at 10:08 AM, Christian Thalinger wrote: > On Feb 21, 2011, at 4:43 PM, Christian Thalinger wrote: >> I fixed that but it didn't change performance.  I just tried bench_tak and >> there is still a regression.  I will look at that next. I'll spew some nonsense here and you tel

Re: Projects, which use JSR292

2011-02-21 Thread Christian Thalinger
On Feb 21, 2011, at 4:43 PM, Christian Thalinger wrote: > I fixed that but it didn't change performance. I just tried bench_tak and > there is still a regression. I will look at that next. Last email for today, I promise :-) This last fix is actually causing the regression. The method gets t

Re: Projects, which use JSR292

2011-02-21 Thread Christian Thalinger
On Feb 21, 2011, at 4:33 PM, Christian Thalinger wrote: > On Feb 21, 2011, at 3:19 PM, Charles Oliver Nutter wrote: >> On Mon, Feb 21, 2011 at 8:07 AM, Christian Thalinger >> wrote: >>> Alright, I know what's going wrong. The recursive inlining logic does not >>> recognize when recursive inlinin

Re: Projects, which use JSR292

2011-02-21 Thread Christian Thalinger
On Feb 21, 2011, at 3:19 PM, Charles Oliver Nutter wrote: > On Mon, Feb 21, 2011 at 8:07 AM, Christian Thalinger > wrote: >> Alright, I know what's going wrong. The recursive inlining logic does not >> recognize when recursive inlining happens like: >> >> fib_ruby -> invokeExact -> fib_ruby ->

Re: Projects, which use JSR292

2011-02-21 Thread Christian Thalinger
On Feb 21, 2011, at 3:10 PM, Charles Oliver Nutter wrote: > On Mon, Feb 21, 2011 at 7:19 AM, Christian Thalinger > wrote: >>> I was dozing this afternoon and wondered if perhaps the indy recursive >>> calls are not reducing the recursive inlining count within Hotspot. >>> Perhaps it could explain

Re: Projects, which use JSR292

2011-02-21 Thread Charles Oliver Nutter
On Mon, Feb 21, 2011 at 8:07 AM, Christian Thalinger wrote: > Alright, I know what's going wrong.  The recursive inlining logic does not > recognize when recursive inlining happens like: > > fib_ruby -> invokeExact -> fib_ruby -> ... > > I try to add some additional logic there. I think that mak

Re: Projects, which use JSR292

2011-02-21 Thread Charles Oliver Nutter
On Mon, Feb 21, 2011 at 7:19 AM, Christian Thalinger wrote: >> I was dozing this afternoon and wondered if perhaps the indy recursive >> calls are not reducing the recursive inlining count within Hotspot. >> Perhaps it could explain why recursive calls are being inlined so >> heavily, potentially

Re: Projects, which use JSR292

2011-02-21 Thread Christian Thalinger
On Feb 21, 2011, at 2:19 PM, Christian Thalinger wrote: > On Feb 21, 2011, at 2:14 PM, Charles Oliver Nutter wrote: >> On Mon, Feb 21, 2011 at 3:19 AM, Christian Thalinger >> wrote: >>> I understand that and I also want the performance to be better than before. >>> I try to find out why HotSpot

Re: Projects, which use JSR292

2011-02-21 Thread Christian Thalinger
On Feb 21, 2011, at 2:14 PM, Charles Oliver Nutter wrote: > On Mon, Feb 21, 2011 at 3:19 AM, Christian Thalinger > wrote: >> I understand that and I also want the performance to be better than before. >> I try to find out why HotSpot is inlining the recursive calls indefinitely... > > I was doz

Re: Projects, which use JSR292

2011-02-21 Thread Charles Oliver Nutter
On Mon, Feb 21, 2011 at 3:19 AM, Christian Thalinger wrote: > I understand that and I also want the performance to be better than before.   > I try to find out why HotSpot is inlining the recursive calls indefinitely... I was dozing this afternoon and wondered if perhaps the indy recursive calls

Re: Projects, which use JSR292

2011-02-21 Thread Christian Thalinger
On Feb 18, 2011, at 9:06 PM, Charles Oliver Nutter wrote: > I'm not grousing about performance, mind you :) I think it's just > awesome how cleanly this is working so far with not a whole lot of > effort. I'm champing at the bit to make all of JRuby > invokedynamic-aware. But obviously the perf is

Re: Projects, which use JSR292

2011-02-18 Thread Charles Oliver Nutter
I also need to say this: PUT ME TO WORK :) I'm very eager to start showing off invokedynamic and make it pervasive throughout JRuby (or as pervasive as possible while still supporting Java 6). Tell me what I need to do to help! - Charlie On Fri, Feb 18, 2011 at 2:06 PM, Charles Oliver Nutter wr

Re: Projects, which use JSR292

2011-02-18 Thread Charles Oliver Nutter
On Fri, Feb 18, 2011 at 7:19 AM, Christian Thalinger wrote: > What I can tell so far is that setting rubyDirect=true inlines a whole lot > more stuff than without.  I looks like it wants to inline all recursive calls > of fib_ruby into a single method, which doesn't work very well, hitting two

Re: Projects, which use JSR292

2011-02-18 Thread Christian Thalinger
On Feb 18, 2011, at 2:19 PM, Christian Thalinger wrote: > On Feb 18, 2011, at 1:28 PM, Charles Oliver Nutter wrote: >> On Fri, Feb 18, 2011 at 6:17 AM, Christian Thalinger >> wrote: >>> Is there a switch to turn direct ruby-to-ruby calls on and off? I'd like >>> to compare inlining trees and may

Re: Projects, which use JSR292

2011-02-18 Thread Christian Thalinger
On Feb 18, 2011, at 1:28 PM, Charles Oliver Nutter wrote: > On Fri, Feb 18, 2011 at 6:17 AM, Christian Thalinger > wrote: >> Is there a switch to turn direct ruby-to-ruby calls on and off? I'd like to >> compare inlining trees and maybe code output. > > Just pushed a couple for you in a4a0802:

Re: Projects, which use JSR292

2011-02-18 Thread Christian Thalinger
On Feb 18, 2011, at 1:33 PM, Charles Oliver Nutter wrote: > FYI, my "patches/hotspot" dir is at revision 6eddc7cbeba6 I'm using hotspot-comp/hotspot/ -- Christian > > - Charlie > > On Fri, Feb 18, 2011 at 6:28 AM, Charles Oliver Nutter > wrote: >> On Fri, Feb 18, 2011 at 6:17 AM, Christian Th

Re: Projects, which use JSR292

2011-02-18 Thread Charles Oliver Nutter
FYI, my "patches/hotspot" dir is at revision 6eddc7cbeba6 - Charlie On Fri, Feb 18, 2011 at 6:28 AM, Charles Oliver Nutter wrote: > On Fri, Feb 18, 2011 at 6:17 AM, Christian Thalinger > wrote: >> Is there a switch to turn direct ruby-to-ruby calls on and off?  I'd like to >> compare inlining

Re: Projects, which use JSR292

2011-02-18 Thread Charles Oliver Nutter
On Fri, Feb 18, 2011 at 6:17 AM, Christian Thalinger wrote: > Is there a switch to turn direct ruby-to-ruby calls on and off?  I'd like to > compare inlining trees and maybe code output. Just pushed a couple for you in a4a0802: jruby.compile.invokedynamic.rubyDirect=true|false (Ruby targets dir

Re: Projects, which use JSR292

2011-02-18 Thread Christian Thalinger
On Feb 18, 2011, at 12:52 PM, Charles Oliver Nutter wrote: > On Fri, Feb 18, 2011 at 5:24 AM, Rémi Forax wrote: >> Good news ! >> Charles does it mean that JRuby's invokedynamic now works without >> using the previously existing logic. >> I mean, you use only method handles from the callsite to th

Re: Projects, which use JSR292

2011-02-18 Thread Charles Oliver Nutter
On Fri, Feb 18, 2011 at 5:56 AM, Charles Oliver Nutter wrote: > wrote: >> I did just land another revision that allows Ruby to Ruby calls >> meeting the above criteria to bind all the way through, and >> performance dropped precipitously: > > The degradation for tak is just as significant: More

Re: Projects, which use JSR292

2011-02-18 Thread Charles Oliver Nutter
On Fri, Feb 18, 2011 at 5:52 AM, Charles Oliver Nutter wrote: > I did just land another revision that allows Ruby to Ruby calls > meeting the above criteria to bind all the way through, and > performance dropped precipitously: The degradation for tak is just as significant: Before: ~/projects/j

Re: Projects, which use JSR292

2011-02-18 Thread Charles Oliver Nutter
On Fri, Feb 18, 2011 at 5:24 AM, Rémi Forax wrote: > Good news ! > Charles does it mean that JRuby's invokedynamic now works without > using the previously existing logic. > I mean, you use only method handles from the callsite to the target method. More and more, but definitely not completely. I

Re: Projects, which use JSR292

2011-02-18 Thread Rémi Forax
On 02/18/2011 11:44 AM, Christian Thalinger wrote: > On Feb 16, 2011, at 6:21 PM, Christian Thalinger wrote: >>> Ahh, I must still have one or more of my permutes botched. I'll try to >>> fix this up today. Thanks! >> When this is in, I try to confirm your numbers. > I can confirm your numbers. Go

Re: Projects, which use JSR292

2011-02-18 Thread Christian Thalinger
On Feb 16, 2011, at 6:21 PM, Christian Thalinger wrote: >> Ahh, I must still have one or more of my permutes botched. I'll try to >> fix this up today. Thanks! > > When this is in, I try to confirm your numbers. I can confirm your numbers. This is a 32-bit Linux product build: $ $JAVA_HOME/bin/

Re: Projects, which use JSR292

2011-02-16 Thread Christian Thalinger
On Feb 16, 2011, at 6:12 PM, Charles Oliver Nutter wrote: > On Wed, Feb 16, 2011 at 4:00 AM, Christian Thalinger > wrote: >>> I'm still a little skeptical about that. What benchmarks did you run? > > Skeptical? Do you think it should be faster or slower? Slower. I can't think of any changes we

Re: Projects, which use JSR292

2011-02-16 Thread Charles Oliver Nutter
Oh FYI, in order to get good perf I had to bump up InlineSmallCode to at *least* 2000, and it seemed to settle into best perf at 5000. On Wed, Feb 16, 2011 at 11:12 AM, Charles Oliver Nutter wrote: > On Wed, Feb 16, 2011 at 4:00 AM, Christian Thalinger > wrote: >>> I'm still a little skeptical a

Re: Projects, which use JSR292

2011-02-16 Thread Charles Oliver Nutter
On Wed, Feb 16, 2011 at 4:00 AM, Christian Thalinger wrote: >> I'm still a little skeptical about that.  What benchmarks did you run? Skeptical? Do you think it should be faster or slower? I was comparing recursive fib (bench_fib_recursive.rb) with normal JRuby versus JRuby + indy. Normal was ar

Re: Projects, which use JSR292

2011-02-16 Thread fo...@x9c.fr
Le 15 févr. 2011 à 18:13, John Rose a écrit : > On Feb 15, 2011, at 6:50 AM, Kirill Shirokov wrote: > >> - JRuby by Charles Oliver Nutter >> - PHP.reboot by Remi Forax >> - Smalltalk implementation by Mark Roos (in progress) > > > I think this recent thread is about an OCaml implementation by

Re: Projects, which use JSR292

2011-02-16 Thread Jochen Theodorou
Am 15.02.2011 18:02, schrieb John Rose: [...] >> We would in fact need a InstanceValue, > > This is hard, and probably amounts to a change-class operator. I > suppose you need this for arbitrary pre-existing objects from > non-cooperating classes? yes >> but it will help already avoiding some bi

Re: Projects, which use JSR292

2011-02-16 Thread Christian Thalinger
On Feb 16, 2011, at 10:55 AM, Christian Thalinger wrote: > On Feb 15, 2011, at 7:03 PM, Charles Oliver Nutter wrote: >> * Performance >> >> Because JRuby does a pretty good job optimizing, indy only recently >> started to be faster than our normal call protocol logic. I expect to >> see it get bet

Re: Projects, which use JSR292

2011-02-16 Thread Christian Thalinger
On Feb 15, 2011, at 7:03 PM, Charles Oliver Nutter wrote: > * Performance > > Because JRuby does a pretty good job optimizing, indy only recently > started to be faster than our normal call protocol logic. I expect to > see it get better and better as more of the method handle chain > inlines and

Re: Projects, which use JSR292

2011-02-15 Thread Charles Oliver Nutter
On Tue, Feb 15, 2011 at 8:50 AM, Kirill Shirokov wrote: > - JRuby by Charles Oliver Nutter > - PHP.reboot by Remi Forax > - Smalltalk implementation by Mark Roos (in progress) My "other" language, Mirah, also has prototype support for invokedynamic using JSR-292, in the following form (similar to

Re: Projects, which use JSR292

2011-02-15 Thread Rémi Forax
On 02/15/2011 06:13 PM, John Rose wrote: > On Feb 15, 2011, at 6:50 AM, Kirill Shirokov wrote: > >> - JRuby by Charles Oliver Nutter >> - PHP.reboot by Remi Forax >> - Smalltalk implementation by Mark Roos (in progress) And Java lambda in JDK8. The current prototype already use JSR 292. > > I thi

Re: Projects, which use JSR292

2011-02-15 Thread John Rose
On Feb 15, 2011, at 6:50 AM, Kirill Shirokov wrote: > - JRuby by Charles Oliver Nutter > - PHP.reboot by Remi Forax > - Smalltalk implementation by Mark Roos (in progress) I think this recent thread is about an OCaml implementation by Xavier Clerc: http://mail.openjdk.java.net/pipermail/mlvm-d

Re: Projects, which use JSR292

2011-02-15 Thread John Rose
On Feb 15, 2011, at 7:51 AM, Jochen Theodorou wrote: > Am 15.02.2011 15:50, schrieb Kirill Shirokov: >> Hi All, >> >> Oracle will make an one-day conference called "Java Tech Day" in St. >> Petersburg, Russia. There will be a section called "ask the experts" for >> a number of JDK7 features inclu

Re: Projects, which use JSR292

2011-02-15 Thread Jochen Theodorou
Am 15.02.2011 15:50, schrieb Kirill Shirokov: > Hi All, > > Oracle will make an one-day conference called "Java Tech Day" in St. > Petersburg, Russia. There will be a section called "ask the experts" for > a number of JDK7 features including JSR 292. I'm asked to be a live > emulator of JSR292 expe

Projects, which use JSR292

2011-02-15 Thread Kirill Shirokov
Hi All, Oracle will make an one-day conference called "Java Tech Day" in St. Petersburg, Russia. There will be a section called "ask the experts" for a number of JDK7 features including JSR 292. I'm asked to be a live emulator of JSR292 expert there. I expect that people will ask about "real"