Re: polymorphic inline caches

2001-11-13 Thread Piers Cawley
Dan Sugalski [EMAIL PROTECTED] writes: At 11:39 AM 11/12/2001 -0500, Ken Fox wrote: Simon Cozens wrote: You save one level of indirection, at a large complexity cost. A lot less complexity than a JIT though. 100% portable code too. It's got the same sort of issue that a lot of other

polymorphic inline caches

2001-11-12 Thread Ken Fox
I few days ago I suggested inlining some PMC methods would be good for performance. It turns out that this question has been heavily studied by the OO community for at least 10 years. A common solution is to dynamically replace a method call with the body of the method wrapped in an if statement.

Re: polymorphic inline caches

2001-11-12 Thread Simon Cozens
On Mon, Nov 12, 2001 at 10:15:19AM -0500, Ken Fox wrote: Where this fits into Parrot's interpreter is that languages could pre-generate ops corresponding to dynamically generated inlined caches. All we need is a way to replace the simple method call op with the inlined one. You save one

Re: polymorphic inline caches

2001-11-12 Thread Ken Fox
Simon Cozens wrote: You save one level of indirection, at a large complexity cost. A lot less complexity than a JIT though. 100% portable code too. It's also something that can be bolted on later, so there's no reason to reject it now. I'm just throwing it out to the list because I know other

Re: polymorphic inline caches

2001-11-12 Thread Dan Sugalski
At 11:39 AM 11/12/2001 -0500, Ken Fox wrote: Simon Cozens wrote: You save one level of indirection, at a large complexity cost. A lot less complexity than a JIT though. 100% portable code too. It's got the same sort of issue that a lot of other inlining's got, but... In those cases where

Re: polymorphic inline caches

2001-11-12 Thread Simon Cozens
On Mon, Nov 12, 2001 at 11:39:34AM -0500, Ken Fox wrote: It's also something that can be bolted on later, so there's no reason to reject it now. I'm not *reject*ing it now. I'm rejecting it *now*. :) -- The trouble with computers is that they do what you tell them, not what you want.