Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86833 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 28863 invoked from network); 24 Jun 2015 03:20:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Jun 2015 03:20:50 -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.49 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.213.49 mail-yh0-f49.google.com Received: from [209.85.213.49] ([209.85.213.49:33768] helo=mail-yh0-f49.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 79/82-11255-0122A855 for ; Tue, 23 Jun 2015 23:20:49 -0400 Received: by yhpn97 with SMTP id n97so11891677yhp.0 for ; Tue, 23 Jun 2015 20:20:46 -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=DvprXqh9VBk32P48vm1ztG+LB28sGfKM7XqlqnRcm50=; b=yUEqgALfUPqh+DZxD4+P4L5WkSOBfDR75dWhDfPYQS1kbc6cuNz3z4Et8BRBxXgaVZ M4j8bEgmp6LKZx1NHy/2BhaJva12XQLuGxb5XPGrLO8SX/GucyHEZcH43r5lzmKJ0F87 ENlGppoaDzUXZSR9oKEbqKOqHd2oIVl1rgnTQLwh4VkW2ZWHMpg/+DMiYaLFkbaW2XIC qyV8f9u0t2Ybb+x+9N4/rO+a6/cjl1J2eK8YqHfAFUHJq/0BEvIndBu2pOJZ8wM38djh 3xN8KAMSY9vJv1UWrbcQjCwUCc7Q1PK7nzXWv992NMUafJjglABAxR/BjwNIbmyXjksj +rjg== X-Received: by 10.13.251.199 with SMTP id l190mr47764566ywf.148.1435116046156; Tue, 23 Jun 2015 20:20:46 -0700 (PDT) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.129.48.129 with HTTP; Tue, 23 Jun 2015 20:20:06 -0700 (PDT) In-Reply-To: References: Date: Wed, 24 Jun 2015 12:20:06 +0900 X-Google-Sender-Auth: 3N3QJMrl9n0_LXhW4BYhPvA2VqY Message-ID: To: Juan Basso Cc: PHP Internals , Anthony Ferrara , Xinchen Hui Content-Type: multipart/alternative; boundary=94eb2c07e992248a2f05193afebf Subject: Re: [PHP-DEV] Optimizing php_html_entities() From: yohgaki@ohgaki.net (Yasuo Ohgaki) --94eb2c07e992248a2f05193afebf Content-Type: text/plain; charset=UTF-8 Hi Juan, On Wed, Jun 24, 2015 at 12:05 PM, Juan Basso wrote: > Did you test the performance impact on strings? Since you changed how it > works the impact can be positive and maybe worth to make the method more > broad. It's a bit slower (~3%) for 'abc' as input string. If I remove redundant type check(convert_to_string), it's better though. ~3% seems too large for 2 additional if statements - parameter type check. I'll look into. [yohgaki@dev github-php-src]$ cat b.php