Re: [PHP-DEV] 64 bit string offsets

[email protected] (Andrea Faulds)
Newsgroups php.internals
Message-ID <[email protected]>
On 29 Aug 2014, at 17:39, Anatol Belski <[email protected]> wrote:

> On Fri, August 29, 2014 17:54, Andrea Faulds wrote:
> 
>> I’d just leave things as they are… though I suppose there might be some
>> benefit to switching to size_t for string offsets. Does that avoid a cast
>> in the generated assembly?
> My point is just that it should be consistent as we have it, in less or or
> prefferably more plausible way. Though i didn't quite understand the
> question about the compiled assembly - you mean whether it'll be binary
> compatible with the previous bins? then no.

If I recall correctly, one of the reasons to use size_t for string lengths was avoid casts in the generated machine code. That’s what I was referring to: on 64-bit platforms, you’d need to do a 32-bit to 64-bit cast.

--
Andrea Faulds
http://ajf.me/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.