Re: [jruby-dev] dynamic features

2009-07-28 Thread Yehuda Katz
I'm personally quite interested in seeing what the profile of Ruby code is that can run extremely fast, because it's certainly possible to restrict core class implementations to that. And if that's possible, it might be possible to have fast core classes in Ruby (at least experimentally), which cou

Re: [jruby-dev] dynamic features

2009-07-28 Thread Yehuda Katz
Good idea. This would make define_method free in a lot of common cases. It would also give rise to optimizations in Ruby code that are kinda unpleasant (to make blocks faster, don't use local variables), but hey... -- Yehuda On Tue, Jul 28, 2009 at 9:37 PM, Thomas E Enebo wrote: > On Wed, Jul 29

Re: [jruby-dev] dynamic features

2009-07-28 Thread Thomas E Enebo
On Wed, Jul 29, 2009 at 9:06 AM, Subramanya Sastry wrote: > >> > It is good to hear from everyone about common code patterns and what the >> > common scenarios are, and what needs to be targeted.  But, the problem >> > often >> > is that ensuring correctness for the 1% (or even 0.1%) uncommon case

Re: [jruby-dev] dynamic features

2009-07-28 Thread Thomas E Enebo
On Wed, Jul 29, 2009 at 7:55 AM, Charles Oliver Nutter wrote: > On Sat, Jul 25, 2009 at 10:37 PM, Thomas E Enebo wrote: >> Hotspot will synthesize types based on runtime profiling for things >> like interfaces so that it can internally perform static dispatch (or >> so I have been told).  They also

Re: [jruby-dev] dynamic features

2009-07-28 Thread Charles Oliver Nutter
On Tue, Jul 28, 2009 at 7:06 PM, Subramanya Sastry wrote: > I probably lean towards the latter.  But, insofaras all implementations have > bugs and specs are incomplete, you have some leeway probably.  In addition, > I am not sure if there is a solid language spec for Ruby which also leaves > the p

Re: [jruby-dev] dynamic features

2009-07-28 Thread Subramanya Sastry
> > It is good to hear from everyone about common code patterns and what the > > common scenarios are, and what needs to be targeted. But, the problem > often > > is that ensuring correctness for the 1% (or even 0.1%) uncommon case > might > > effectively block good performance for the 99% common

Re: [jruby-dev] dynamic features

2009-07-28 Thread Charles Oliver Nutter
On Sun, Jul 26, 2009 at 12:01 AM, Subramanya Sastry wrote: >> However--as I have pointed out to Charlie a number of times--in practice, >> classes are basically frozen after *some* time. In Rails, pretty much all >> classes reach their final stage at the end of the bootup phase. However, >> since J

Re: [jruby-dev] dynamic features

2009-07-28 Thread Charles Oliver Nutter
On Sat, Jul 25, 2009 at 10:37 PM, Thomas E Enebo wrote: > Hotspot will synthesize types based on runtime profiling for things > like interfaces so that it can internally perform static dispatch (or > so I have been told).  They also have guards to deopt if their type > assumptions are wrong.  We co

Re: [jruby-dev] dynamic features

2009-07-25 Thread Subramanya Sastry
Okay last mail for the day :-) However--as I have pointed out to Charlie a number of times--in practice, > classes are basically frozen after *some* time. In Rails, pretty much all > classes reach their final stage at the end of the bootup phase. However, > since JRuby only sees a parse phase and

Re: [jruby-dev] dynamic features

2009-07-25 Thread Thomas E Enebo
On Sun, Jul 26, 2009 at 3:26 AM, Subramanya Sastry wrote: > I have been trying to lay down clearly all the dynamic features of Ruby so > that I understand this better.  Please add/correct if I have understood this > incorrectly > > 1. Open classes: This is the well known case where you can modify c

Re: [jruby-dev] dynamic features

2009-07-25 Thread Charles Oliver Nutter
On Sat, Jul 25, 2009 at 11:38 PM, Yehuda Katz wrote: > On Sat, Jul 25, 2009 at 7:26 PM, Subramanya Sastry > wrote: >> 1. Open classes: This is the well known case where you can modify classes, >> add methods, redefine methods at runtime.  This effectively means that >> method calls cannot be resol

Re: [jruby-dev] dynamic features

2009-07-25 Thread Yehuda Katz
On Sat, Jul 25, 2009 at 7:26 PM, Subramanya Sastry wrote: > I have been trying to lay down clearly all the dynamic features of Ruby so > that I understand this better. Please add/correct if I have understood this > incorrectly > > 1. Open classes: This is the well known case where you can modify