Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86828 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 17138 invoked from network); 24 Jun 2015 02:36:21 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Jun 2015 02:36:21 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.44 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.213.44 mail-yh0-f44.google.com Received: from [209.85.213.44] ([209.85.213.44:35917] helo=mail-yh0-f44.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F9/90-11255-3A71A855 for ; Tue, 23 Jun 2015 22:36:20 -0400 Received: by yhan67 with SMTP id n67so11577006yha.3 for ; Tue, 23 Jun 2015 19:36:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=pOgYYV/2a+W7+gi2Kb9cnmCRmwbY4qyDipPZGB6Mr9w=; b=Lu3EiFKsG4LpHfdNlOtK88CdkX2BGnJ9E+hWRC5ViVI1rWl3XQ6HrHABGCOizJLP/3 JMrT4QrExuJisGt48MayLWPRTAndU/EEHrAQ/9WUkRN3inaopcIlErd7M7hAS6uKAFtq AIp8qZRevRD9Do/UZf62Nl/6GdXCWx/uWGPkKCj74ZIODkT6NoxjP75Ccfepa7mM3XA1 fr14x8HHF3E3gMPlJrH+buWMlCmUQfmuQSvh46VZ8auKbhaIZFV/ThHSGyY+vIpEWags V5xdmcUPzPWzbJOy4Ap2g8pJtR7lecL7AOiFlPM10ByvB4zRU6cxsulf7mlp3FmJ0QpN nhfA== X-Received: by 10.170.57.68 with SMTP id 65mr40779323ykz.35.1435113377311; Tue, 23 Jun 2015 19:36:17 -0700 (PDT) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.129.48.129 with HTTP; Tue, 23 Jun 2015 19:35:38 -0700 (PDT) In-Reply-To: References: Date: Wed, 24 Jun 2015 11:35:38 +0900 X-Google-Sender-Auth: cKJ7d_KpmMVtRZKV0qyzXNsi7mI Message-ID: To: Xinchen Hui Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a11397fee11321605193a5fa4 Subject: Re: [PHP-DEV] Optimizing php_html_entities() From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a11397fee11321605193a5fa4 Content-Type: text/plain; charset=UTF-8 Hi Xinchen, On Wed, Jun 24, 2015 at 11:31 AM, Xinchen Hui wrote: > > > > On Wed, Jun 24, 2015 at 8:32 AM, Yasuo Ohgaki wrote: > > Hi Xinchen, > > > > On Tue, Jun 23, 2015 at 11:33 PM, Xinchen Hui wrote: > >> > >> But passing an non-string to htmlspecialchars are not common used > cases.. > >> > >> "optimize" not common used cases... will bring nothing to us.. > > > > > > The reason why I looked into this in the first place is one of my friend > > complained about slow htmlspecialchars for relatively large table data. > > > > He said more than half of execution time is took by htmlspecialchars > > because > > > > - it escapes numeric values as string > > - it does not accept array value for to be escaped values > > > > 1st is covered by this patch. > > 2nd issue is covered by this FR. > > https://bugs.php.net/bug.php?id=69908 > > > > So it brings something for us :) > Then what about strlen(number)? are you also going to change its ZPP > to accept zval instead of string? No. Only some kind of conversion functions are the subject. e.g. mb_convert_encoding(), mb_convert_kana(), etc. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --001a11397fee11321605193a5fa4--