Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:76954 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 63451 invoked from network); 29 Aug 2014 15:49:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Aug 2014 15:49:53 -0000 Authentication-Results: pb1.pair.com header.from=anatol.php@belski.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=anatol.php@belski.net; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain belski.net from 85.214.73.107 cause and error) X-PHP-List-Original-Sender: anatol.php@belski.net X-Host-Fingerprint: 85.214.73.107 klapt.com Received: from [85.214.73.107] ([85.214.73.107:57621] helo=h1123647.serverkompetenz.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3C/86-22920-F11A0045 for ; Fri, 29 Aug 2014 11:49:52 -0400 Received: by h1123647.serverkompetenz.net (Postfix, from userid 33) id 6A3D96D209C; Fri, 29 Aug 2014 17:49:48 +0200 (CEST) Received: from 79.197.64.170 (SquirrelMail authenticated user anatol@belski.net) by webmail.klapt.com with HTTP; Fri, 29 Aug 2014 17:49:48 +0200 Message-ID: <2afc5a878ff4c780c74f4604f77525c1.squirrel@webmail.klapt.com> Date: Fri, 29 Aug 2014 17:49:48 +0200 To: internals@lists.php.net Cc: "Nikita Popov" , "Pierre Joye" , "Dmitry Stogov" , "Laruence" User-Agent: SquirrelMail/1.5.2 [SVN] MIME-Version: 1.0 Content-Type: text/plain;charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: 64 bit string offsets From: anatol.php@belski.net ("Anatol Belski") Hi, while refining the big string support, it turned out that we've an issue. The syntax like $s[42] = 'x'; is currently inconsistend, because we have uint32 for string offsets. This actually means, the behaviour is currently only available in the old style and can handle not more than 2gb big strings. Also discussed with Laruence on IRC and he actually expressed the concern that we pay overhead on that. From my side I was investigating on that and could suggest several solutions for that: - stay with the old behavior (indexes would be able to handle only 2gb strings, this is the status quo) - implement a function like in JS String.charAt() as alternative - turn to some temp_variable solution we currently have in PHP5. Laruence told be that dropping temp_variable was one of the improvementes. Actually, the string index functionality is utilized in two opcodes, so maybe that were just a local case. Anyway not talking about touching zval, as that would grow by 8 bytes with a size_t str_offset. Just maybe there were another solution I oversee? Regards Anatol