Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86827 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 14890 invoked from network); 24 Jun 2015 02:31:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Jun 2015 02:31:47 -0000 Authentication-Results: pb1.pair.com header.from=laruence@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=xinchen.h@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 209.85.216.47 as permitted sender) X-PHP-List-Original-Sender: xinchen.h@zend.com X-Host-Fingerprint: 209.85.216.47 mail-vn0-f47.google.com Received: from [209.85.216.47] ([209.85.216.47:34208] helo=mail-vn0-f47.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9A/20-11255-E861A855 for ; Tue, 23 Jun 2015 22:31:45 -0400 Received: by vnbg190 with SMTP id g190so4379709vnb.1 for ; Tue, 23 Jun 2015 19:31:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=mEglEKJ2OhFrsEUeAUkf7BcAtRXcXrPr9zBZb5sFMFU=; b=DJN3pr56+Xzalj8W6BKErkdbSqlQyb46QRitpJQb6jbVwUyexZ9NxmqWoETzpV24va YM/hCNsb4nVEHdEgcbDw20xS64rehTXhiYrqi6x+gZ5mDQhExhozFtJIBZi0lVxXRUB6 4YH33P0XBFZTo89XT7srkeRAo5/Hu5Al18P7GpSwMEbla6NmKNhy0rhV+oSibQOWuu7L atOtK6XmswW/LxutQzoFD7Huao7P/9hzRf9rfH4mwlg64e4YTCdgITiPu0q5ktwV/O0a HHA2zQphjjGzb1KpQt3DiKM38eFr814YbZ3ZAg1wlK+tXF+sf/tPrS+w6lfChVHGYY3g SSpw== X-Gm-Message-State: ALoCoQlJOEzcKxr/cbYohxF/guyYlqGYKXyaZMVu4yy5TgcTjvBMB/lzDnkm70GLkk5XOLbC7u9a3zZOIY9uGCy0YFggU4Bg8MZsfLD7VUoADH2FvjAK90G5nWo3Hp2hrHRXwOHDXmzkaB0i7mNjuj3duNwScDXcfqBlCqRd2AwB1zK6gBOr/HA= X-Received: by 10.52.166.69 with SMTP id ze5mr35050124vdb.47.1435113099544; Tue, 23 Jun 2015 19:31:39 -0700 (PDT) Received: from mail-vn0-f45.google.com (mail-vn0-f45.google.com. [209.85.216.45]) by mx.google.com with ESMTPSA id qj9sm4646513vdb.9.2015.06.23.19.31.38 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Jun 2015 19:31:39 -0700 (PDT) Received: by vnbf7 with SMTP id f7so4353765vnb.7 for ; Tue, 23 Jun 2015 19:31:38 -0700 (PDT) X-Received: by 10.52.89.174 with SMTP id bp14mr35141153vdb.58.1435113098549; Tue, 23 Jun 2015 19:31:38 -0700 (PDT) MIME-Version: 1.0 Received: by 10.31.12.1 with HTTP; Tue, 23 Jun 2015 19:31:19 -0700 (PDT) In-Reply-To: References: Date: Wed, 24 Jun 2015 10:31:19 +0800 Message-ID: To: Yasuo Ohgaki Cc: "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Optimizing php_html_entities() From: laruence@php.net (Xinchen Hui) Hey: 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? thanks > > Regards, > > -- > Yasuo Ohgaki > yohgaki@ohgaki.net > -- Xinchen Hui @Laruence http://www.laruence.com/