The improvement are made with JIT in mind. In the future, in many places we
might predict the type and don't check it at all.
Thanks. Dmitry.
On Mon, May 5, 2014 at 7:26 PM, Johannes Schlüter <[email protected]>wrote:
> Hi,
>
> On Mon, 2014-05-05 at 18:31 +0400, Dmitry Stogov wrote:
> > I'm doing it right now: https://wiki.php.net/phpng-int
>
> I haven't looked deeply into it, but a thing I wondered about old zvals
> already:
>
> CELL Format (zval)
>
>
> +----------------------------------------------------------------------------------+
> | VALUE (64-bit)
> |
>
> +--------------------------+-------------+-------------+-------------+-------------+
> | UNUSED (32-bit) | UNUSED | const_flags | type_flags |
> TYPE |
>
> +--------------------------+-------------+-------------+-------------+-------------+
> 63 32 31 24 23 16 15 8 7
> 0
>
> Have you tried movin the TYPE to the einning of the structure? - I
> assume checking/setting the type is the most common operation. By moving
> it upfront the address of the type equals the address of the zval, thus
> the CPU should be ale to access it without offset, might improve
> pipeline throughput.
>
> I haven't measured that, but miht be interesting while already chaning
> this.
>
> johannes
>
>