Re: Method call overhead

From: Date: Thu, 04 Jun 2015 04:35:53 +0000
Subject: Re: Method call overhead
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-86482@lists.php.net to get a copy of this message
Hi Brian, On Thu, Jun 4, 2015 at 7:33 AM, Brian Moon <brian@moonspot.net> wrote: > This is a better representation of what you are trying to show. It removes > all the magic call back stuff that could be adding to the slowness you are > seeing. In addition, it does not create a new object on every call for the > object method. Creating a new object is going to explicitly slow things > down. But, it's not related to the call time. > > http://3v4l.org/biM9G > This version adds up precision errors because microtime() precision is not high enough for the purpose. Since the error is random, it does not affect proportion much but total execution time. Following damn code does better job for these kinds of benchmarks. http://3v4l.org/eJK07 See the total amount of execution time recorded. If we really need pure execution time, then it should record "for loop" execution time with empty body. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net

« previous php.internals (#86482) next »