Re: cvs: php-benchmarks /benchcli/tests test_whirl.php /benchcli/tests/phpWhirl 99bottles.wr AUTHORS COPYING keymaker.wr whirl.php
/benchcli/tests/phpWhirl/classes WhirlMathRing.php WhirlMemory.php WhirlOpsRing.php WhirlParser.php WhirlRing.

From: Date: Wed, 03 Jun 2009 17:54:47 +0000
Subject: Re: cvs: php-benchmarks /benchcli/tests test_whirl.php /benchcli/tests/phpWhirl 99bottles.wr AUTHORS COPYING keymaker.wr whirl.php
/benchcli/tests/phpWhirl/classes WhirlMathRing.php WhirlMemory.php WhirlOpsRing.php WhirlParser.php WhirlRing.
References: 1 2 3 4 5 6 7 8 9  Groups: php.qa 
Request: Send a blank email to php-qa+get-65068@lists.php.net to get a copy of this message
On Wed, Jun 3, 2009 at 5:33 PM, Alexander Hjalmarsson <hjalle@sgh.se> wrote: > The massif tool is actually faster. On my machine I get these time results > from ackermann: > valgrind (with memcheck): 134s > valgrind (with massif)      :   31s > Without profiler:             :   2.8s > > This shows that massif would be about 15x slower (their documentation says > about 20x). Memcheck is almost 50x slower than "just php" in my case, but > their doc says 10x-30x. > Source: http://valgrind.org/info/tools.html > I don't know how much "lower" then 15x you can get without using things such > as memory_get_peak_usage and stuff. A good thing when using valgrind is that > the user could choose whether to use more advanced features or use memheck. > I do think that the majority of the users who want to use the benchmark > program to bench their scripts actually would like the output that are > produced by those tools to see where improvements are needed. I think you should be able to do better by linking in a memory library. I mentioned a few before (jemalloc and google perftools), but they might not provide that. > I'm pretty confused of which tool to choose, but I don't think that it would > be a waste of time implementing some kind of valgrind usage, would it? I > believe there would be people using it in at least some cases. If we find > any better way of just reporting memory usage, we can include that as well. > I read about the /proc/pid/statm but it looks like that info shouldn't be > used, after some googling. > Anyway, if we implement valgrind or any other profiler, how should the input > be parsed? I believe the best way would be to parse the important results > (like total memory usage) and also save the original output file produced > from the tool, so a user can do whatever he likes with the original results > as well. I think cachegrind might well be worth it. I wrote some code to parse cachegrind before, see http://code.google.com/p/phc/source/browse/trunk/test/framework/bench/valbench#64. Paul -- Paul Biggar paul.biggar@gmail.com

« previous php.qa (#65068) next »