Re: [PHP-DEV] PHP JIT or AOT

2015-02-16 Thread Dmitry Stogov
On Mon, Feb 16, 2015 at 5:21 PM, Anthony Ferrara wrote: > Dmitry, > > On Mon, Feb 16, 2015 at 9:12 AM, Dmitry Stogov wrote: > > > >> > The type checks in PHP7 is quite cheap (2-3 CPU instructions). Strict > or > >> > weak check doesn't make any difference for "fast path" (the same 2-3 > >> > ins

Re: [PHP-DEV] PHP JIT or AOT

2015-02-16 Thread Anthony Ferrara
Dmitry, On Mon, Feb 16, 2015 at 9:12 AM, Dmitry Stogov wrote: > >> > The type checks in PHP7 is quite cheap (2-3 CPU instructions). Strict or >> > weak check doesn't make any difference for "fast path" (the same 2-3 >> > instructions). The slow patch for weak checks is going to be a bit more >> >

Re: [PHP-DEV] PHP JIT or AOT

2015-02-16 Thread Dmitry Stogov
> > The type checks in PHP7 is quite cheap (2-3 CPU instructions). Strict or > > weak check doesn't make any difference for "fast path" (the same 2-3 > > instructions). The slow patch for weak checks is going to be a bit more > > expensive. > > Well, not really. It's 2-3 CPU instructions once you h

Re: [PHP-DEV] PHP JIT or AOT

2015-02-16 Thread Anthony Ferrara
Dmitry and Joe, On Mon, Feb 16, 2015 at 1:59 AM, Dmitry Stogov wrote: > > > On Mon, Feb 16, 2015 at 12:45 AM, Anthony Ferrara > wrote: >> Well, if you know the destination function at compile time, you don't >> need to generate generic code. you can generate a direct dispatch >> (asm-level funct

Re: [PHP-DEV] PHP JIT or AOT

2015-02-16 Thread Dmitry Stogov
On Mon, Feb 16, 2015 at 11:00 AM, Joe Watkins wrote: > It's Monday morning, maybe I'm misunderstanding ... > may be I'm too :) > > > we must already know where it's called from, so we should also know the > types of passed arguments, then we may eliminate checks at all > > We'll always know th

Re: [PHP-DEV] PHP JIT or AOT

2015-02-16 Thread Joe Watkins
> I would be glad, if later we'll combine our experience and work on JIT/AOT together. This is obviously something I look forward too :) Cheers Joe On Mon, Feb 16, 2015 at 8:00 AM, Joe Watkins wrote: > It's Monday morning, maybe I'm misunderstanding ... > > > we must already know where it's ca

Re: [PHP-DEV] PHP JIT or AOT

2015-02-16 Thread Joe Watkins
It's Monday morning, maybe I'm misunderstanding ... > we must already know where it's called from, so we should also know the types of passed arguments, then we may eliminate checks at all We'll always know the types of arguments at the call site surely ? It's knowing the types at the location be

Re: [PHP-DEV] PHP JIT or AOT

2015-02-15 Thread Netroby
I guess we can gave a try. PHP 7 is fine well enough. let's working hard to make it published. The talk about other things should be early . let's see PHP 7 released and see how it will change our world. Code it , ship it. Let's see the result. Appreciate your time.

Re: [PHP-DEV] PHP JIT or AOT

2015-02-15 Thread Dmitry Stogov
On Mon, Feb 16, 2015 at 10:16 AM, Joe Watkins wrote: > Morning, > > I'm not sure where this conversation started ... > it's a fork from "Salar Type Hints"... > > > where in non-strict mode you still need > > to generation runtime conversion logic. That runtime conversion logic > > then require

Re: [PHP-DEV] PHP JIT or AOT

2015-02-15 Thread Joe Watkins
Morning, I'm not sure where this conversation started ... > where in non-strict mode you still need > to generation runtime conversion logic. That runtime conversion logic > then requires the ability to hook into Zend's error handling > mechanism, vastly complicating the generated code (and the g

Re: [PHP-DEV] PHP JIT or AOT

2015-02-15 Thread Dmitry Stogov
On Mon, Feb 16, 2015 at 12:45 AM, Anthony Ferrara wrote: > Dmitry, > > On Sun, Feb 15, 2015 at 1:43 PM, Dmitry Stogov wrote: > > Hi Anthony, > > > > If you are working on JIT, you should understand that declare() switch to > > strict typing can't improve anything, because it works on caller side