Re: The INI framework in PHP 4.0
| From: | Zeev Suraski | Date: | Fri, 26 May 2000 18:20:54 +0000 |
| Subject: | Re: The INI framework in PHP 4.0 | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-19537@lists.php.net to get a copy of this message | ||
On Fri, 26 May 2000, Sascha Schumann wrote:
> > How did you benchmark? I find it hard to believe that 12 hash lookups,
> > malloc's and memcpy's on every request, don't make a significant
> > difference. Was that time you checked it after the session module was in
> > place and with that slow startup?
>
> Sure.
>
> The benchmark was created to show the potential benefit of reducing
> startup costs. Or expressed in a script, <? echo "hello world"; ?>
>
> While there are lies, damn lies and benchmarks, I was not tricky enough
> to produce a benchmark which showed more than 3% or so difference.
You tested in a 'real' environment? With something like 'ab'?
> > Remember, this is PURE overhead that's not useful for anything and can be
> > comlpletely avoided. The marginal gain is huge especially with people who
> > turn on the PHP engine for all pages.
>
> A huge marginal gain? Let numbers speak.
Yeah, if you look at the startup cost of PHP, hash lookups are relatively
costly. estrdup()'s are very costly. Mostly everything else PHP does
during startup is calling almost-empty functions, and walking over linked
lists, which is very quick. True, I haven't conducted benchmarks and I am
using an 'educated gut feeling', so I could be wrong.
Zeev
--
Zeev Suraski <zeev@zend.com>
http://www.zend.com/