Am 6.3.2013 um 22:50 schrieb Will Fitch <willfi...@php.net>:

> On Wed, Mar 6, 2013 at 4:44 PM, Bob Weinand <bobw...@hotmail.com> wrote:
> Am 06.03.2013 um 22:39 schrieb "Will Fitch" <willfi...@php.net>:
> 
>> On Wed, Mar 6, 2013 at 4:10 PM, Bob Weinand <bobw...@hotmail.com> wrote:
>> Hi!
>> 
>> As this seem to require a RFC, here is it:
>> 
>> https://wiki.php.net/rfc/unset_bool
>> 
>> I'm not a fan of this change, but if it's going to be discussed, the RFC 
>> should include baseline and RFC change benchmarks.  
>>  
>> 
>> 
>> Please feedback,
>> 
>> Bob Weinand
>> 
>> --
>> PHP Internals - PHP Runtime Development Mailing List
>> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> I don't see here a real need for a benchmark as it is mostly only returning 
> SUCCESS or FAILURE instead of nothing. Nothing what would slow PHP down.
> 
> Any change to a language construct which requires additional processing adds 
> time.  It may be in minute, but it's part of the discussion.  Since this core 
> change you're requesting comments for introduces a usecase which many will 
> not find useful (probably most voting), it is your responsibility to convince 
> this category of people that the tradeoff won't affect them that much.
> 
> If you choose not to add benchmarking, I will guarantee a -1 from me.
>  
> 
> Bob Weinand


I have tried the following:

time ./sapi/cli/php -r 'while($i++ < 1e7) { $a = true; unset($a); }'

Unpatched: average of 5x executed:
real    0m4.935s
user    0m4.925s
sys     0m0.008s

Patched: average of 5x executed:
real    0m4.945s
user    0m4.938s
sys     0m0.005s


Yes, there is an increase of 0.15%. This is 1 nanosecond more than previous.

Is this exact enough? Or do you need more precision?

If yes, I'll put this into the RFC.


Bob Weinand

Reply via email to