On Tue, Aug 28, 2012 at 3:28 PM, Matijn Woudt <tijn...@gmail.com> wrote:
> On Tue, Aug 28, 2012 at 7:18 PM, Adam Richardson <simples...@gmail.com> wrote:
> Finally, you're the first one that actually has measured something.
> You should redo your test with real world files, because in real world
> functions aren't that small.
In terms of redoing the test with "real world files", that's an
entirely different debate (and one I won't enter into at this time,
though this list has discussed this topic before, most recently in a
post Ted made talking about screen height.)
The point is, there is a real difference. The question remains if the
difference is enough to act on in future code bases (and I would say
yes if my tests showed this difference, you may say no.)
> In functions with more lines (say ~100 lines per function), you'll see
> a different ratio between 5k and 50k. In my tests it is:
> - 5K: 22ms
> - 50K: 34 ms
Those trends/results depend significantly on the contents of the
functions, too. The overly simplistic example we've used both helps
and hurts the analysis (I'll admit my example likely has more
functions than other 5K/50K files, and I suspect most functions
require more complicated work behind the scenes to build up than echo
The point I'd make here is that it's very difficult to have apriori
knowledge of how something will perform without testing it.
> When I create files that only contain 1 function, with just a number
> of echo "Hello world"; lines until 5k or 50k, the results are:
> - 5K: 15 ms
> - 50K: 17 ms
Ummm... sure. What did you say about real world before :)
Have a nice day!
Nephtali: A simple, flexible, fast, and security-focused PHP framework
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php