Re: phpng: Refactored PHP Engine with Big Performance Improvement

From: Date: Mon, 05 May 2014 15:26:21 +0000
Subject: Re: phpng: Refactored PHP Engine with Big Performance Improvement
References: 1 2 3 4 5 6 7  Groups: php.internals 
Request: Send a blank email to internals+get-73907@lists.php.net to get a copy of this message
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

Attachment: [application/pgp-signature] This is a digitally signed message part signature.asc
« previous php.internals (#73907) next »