Initial Smalltalk execution time

2011-05-01 Thread Mark Roos
Now that the core works I thought I would take a quick look at the execution speed. For this I executed the same code in our current environment (OS/2 and a mid 90's Smalltalk) and again using our invokeDynamic based vm translation. The code gets a string, parses in into commands and generates

Re: Assembly output from JRuby 'fib'

2011-05-01 Thread Rémi Forax
It's astonishing how many people want to generate dead code :) Rémi On 04/30/2011 01:03 AM, Charles Nutter wrote: Rémi and I confirmed that it is in fact dead code (JRuby's fault) which is causing a problem for ASM 4 (ASM's fault). He's looking into a fix, and I'll try to eliminate the dead co

Re: Unusually high polymorphic dispatch costs?

2011-05-01 Thread Rémi Forax
On 04/30/2011 11:13 PM, Charles Oliver Nutter wrote: > Well it seems like the GWT-based PIC could be a *great* success, at > least compared to falling back on a single-entry IC. I will shortly > commit another patch to JRuby master that provides a configurable GWT > chain size before giving up and

Re: InvokeDynamic

2011-05-01 Thread Rémi Forax
Hi Daniel, On 04/30/2011 09:51 AM, Daniel Latrémolière wrote: I suggest a syntax for InvokeDynamic. Why ? motivations ? It is created like a field and has a name (for referencing and bootstrapping it), then i suggest to create a new modifier "dynamic" and define InvokeDynamic like a mix o

Re: InvokeDynamic

2011-05-01 Thread Daniel Latrémolière
I suggest a syntax for InvokeDynamic. Why ? motivations ? Because it seems that syntax for InvokeDynamic will not be available in JDK7 and I dislike generating bytecode. I have used ASM, some years ago, and have nothing against it, but now I do not like Java bytecode (stack machine) and the

Re: Unusually high polymorphic dispatch costs?

2011-05-01 Thread Mark Roos
With respect to chaining gwt handles. Any thoughts on at what depth the chain should be converted to some other form of dispatch? I am currently just letting them build In smalltalk it seems that around 10-20 inline tests are about the same as a hash lookup but I would think it could be diffe

Re: Unusually high polymorphic dispatch costs?

2011-05-01 Thread Charles Oliver Nutter
On Sun, May 1, 2011 at 1:01 PM, Mark Roos wrote: > With respect to chaining gwt handles. > > Any thoughts on at what depth the chain should be converted to some other > form of dispatch? > I am currently just letting them build > > In smalltalk it seems that around 10-20 inline tests are about the

Re: Assembly output from JRuby 'fib'

2011-05-01 Thread Mark Roos
Not me, but the Smalltalk compiler I inherited seems to see this as an easy way to convert block sends into inline code for some cases. My fix is ugly ( post process to look for dead code and remove it) so when I get around to it I plan to rewrite the compiler. But then it works so its at the

Re: Unusually high polymorphic dispatch costs?

2011-05-01 Thread Rémi Forax
On 04/29/2011 09:59 PM, Ola Bini wrote: > Hi, > > Given that creating GWTs are expensive, is it a really bad idea to > create them and bind them on a cache miss then? My current logic for > call sites look something like this: > > invoke call site > if fallback, check if current morphi

Re: Unusually high polymorphic dispatch costs?

2011-05-01 Thread Mark Roos
In the Smalltalk I am porting the solution they use is to just drop the entire chain and let it reform. The assumption would be that for any short time period in the life of a program no sites are megamorphic. the metric they use is the total amount of active code. Since they actually drop al