Ouch, forgot my powers of two there during a weak moment - what a careless mistake. Sorry about that!
Given the low entropy I highly doubt this to be of much benefit. ========== Original ========== From: Lauri Kenttä <lauri.ken...@gmail.com> To: Benjamin Coutu <ben.co...@zeyos.com> Date: Thu, 27 Oct 2016 17:12:15 +0200 Subject: Re: [PHP-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 byte (minus pointer tag bit) for the length. > > That's wrong. 256 = 2**8, and 64 = 2**6, so you get 8/6*7 = 9 chars. > Not really better than 7 chars, especially considering that all > operations on single characters would be slower than usual. > -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php