Re: Directly embed small strings in zvals
| From: | Lauri Kenttä | Date: | Thu, 27 Oct 2016 15:12:15 +0000 |
| Subject: | Re: Directly embed small strings in zvals | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-96629@lists.php.net to get a copy of this message | ||
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. -- Lauri Kenttä