-DEV] Directly embed small strings in zvals
>
>
> On 2016-10-27 18:02, Benjamin Coutu wrote:
> > Limiting ourselves to these common 64 characters ([a-zA-Z0-9_.]) would
> > allow us to effectively store (256 / 64) * 7 = 28 characters in those
> > available 7-bytes plus 1
On 2016-10-27 18:02, Benjamin Coutu wrote:
Limiting ourselves to these common 64 characters ([a-zA-Z0-9_.]) would
allow us to effectively store (256 / 64) * 7 = 28 characters in those
available 7-bytes plus 1 byte (minus pointer tag bit) for the length.
That's wrong. 256 = 2**8, and 64 = 2**6,
, Dmitry Stogov ,
Xinchen Hui
Date: Tue, 13 Sep 2016 18:29:10 +0200
Subject: [PHP-DEV] Directly embed small strings in zvals
> Hello everyone,
>
> I was wondering if it would make sense to store small strings (length <= 7)
> directly inside the zval struct, thereby avoiding the
Hi Dmitry,
Dmitry Stogov wrote:
I was skeptical about this idea, but the PoC looks interesting and quite simple.
This might be too big change for 7.*, if we won't completely hide
implementation details for extensions using existing macros...
I've wondered about 7.x. You can't *completely* h
Hi Dmitry,
Andrea Faulds wrote:
One nice thing, though, is that the API itself doesn't really change,
you just have to be more careful about how you use it. So,
optimistically, breakage might be quite small. I don't know how much
breakage there is currently.
Sorry, I made a mistake here, I was
ome benchmarks? real-life apps?
Thanks. Dmitry.
From: Andrea Faulds
Sent: Tuesday, September 13, 2016 9:26:03 PM
To: internals@lists.php.net
Subject: Re: [PHP-DEV] Directly embed small strings in zvals
Hi Ben!
Benjamin Coutu wrote:
> I was wondering if it wo
Hi Ben!
Benjamin Coutu wrote:
I was wondering if it would make sense to store small strings (length <= 7)
directly inside the zval struct, thereby avoiding the need to extra allocate a
zend_string, which would also not entail any costly indirection and refcounting
for such strings.
The idea
Hello everyone,
I was wondering if it would make sense to store small strings (length <= 7)
directly inside the zval struct, thereby avoiding the need to extra allocate a
zend_string, which would also not entail any costly indirection and refcounting
for such strings.
The idea would be to add