Re: FW: [PHP-QA] cvs: php-benchmarks /benchcli bench.php /benchcli/data pcre-data.xml /benchcli/misc timer.php /benchcli/tests test_ackermann.php
test_deltablue.php test_gaussjordan.php test_pcre.php test_raytrace.php /benchcli/tests/raytracer Backgr
| From: | Alexander Hjalmarsson | Date: | Thu, 28 May 2009 13:07:37 +0000 |
| Subject: | Re: FW: [PHP-QA] cvs: php-benchmarks /benchcli bench.php /benchcli/data pcre-data.xml /benchcli/misc timer.php /benchcli/tests test_ackermann.php test_deltablue.php test_gaussjordan.php test_pcre.php test_raytrace.php /benchcli/tests/raytracer Backgr |
||
| Groups: | php.qa | ||
| Request: | Send a blank email to php-qa+get-65034@lists.php.net to get a copy of this message | ||
First of all, I forwarded the email to myself so I could reply here instead
of in Outlook. That's why it can look a little bit messy at some parts.
On Mon, May 25, 2009 at 3:03 PM, Alexander Hjalmarsson <hjalle@sgh.se>wrote:
>
>
> -----Original Message-----
> From: Paul Biggar [mailto:paul.biggar@gmail.com]
> Sent: den 25 maj 2009 13:02
> To: Alexander Hjalmarsson
> Cc: php-qa@lists.php.net
> Subject: Re: [PHP-QA] cvs: php-benchmarks /benchcli bench.php
> /benchcli/data pcre-data.xml /benchcli/misc timer.php /benchcli/tests
> test_ackermann.php test_deltablue.php test_gaussjordan.php test_pcre.php
> test_raytrace.php /benchcli/tests/raytracer Background
>
> Hi Alexander,
>
> Just as a note on using CVS, its not good to commit code in a big
> bunch like this, as it makes it very difficult to read and review. It
> should be committed in 5 or 6 different batches, maybe one each for
> new benchmarks, one for moving benchmarks, one for adding framework,
> and one for fixing whitespace issues, etc. (I understand you had
> problems with CVS, so maybe this is a symptom of that...)
>
I shouldn't whine about CVS, but my very poor knowledge just hit the wall in
this case. I will do more "single"-batches instead of one with a bunch of
files.
>
> >
>
> http://cvs.php.net/viewvc.cgi/php-benchmarks/benchcli/misc/timer.php?view=markup&rev=1.1
> > function _clock()
> > {
> > $t = microtime();
> > $t = explode(' ', $t);
> > $t = $t[1] + $t[0];
> > return $t;
> > }
>
> What does this do (needs a comment)? I thought microtime could return
> a float. Why not use that?
> Whitespace problem.
>
I fixed the white space issues and removed the function totally as you said.
There's no reason for it when it can return a float, as it could.
>
>
> >
> ¼jyÜR
> ÖĂυ|mÛhttp://cvs.php.net/viewvc.cgi/php-benchmarks/benchcli/tests/test_ackermann.php?view=markup&rev=1.1ïRÛ#†D
> Ò ÎJ–tˆ
> > Index: php-benchmarks/benchcli/tests/test_ackermann.php
> > +++ php-benchmarks/benchcli/tests/test_ackermann.php
> > <?php
> > /*
> > $Id: test_ackermann.php,v 1.1 2009/05/24 19:01:24 hjalle Exp $
> >
> > http://www.bagley.org/~doug/shootout/<http://www.bagley.org/%7Edoug/shootout/>
> > from Alexander Klimov
> > */
> > function Ack($m, $n){
> > if($m == 0) return $n+1;
> > if($n == 0) return Ack($m-1, 1);
> > return Ack($m - 1, Ack($m, ($n - 1)));
> > }
> > $n = ($argc == 2) ? $argv[1] : 7;
> > $r = Ack(3,$n);
> > ?>
>
> I'd like to see the microbenchmarks split into a separate directory,
> and named according to the feature they test. So this might be
> 'test_recursion'. However, I recommend that you don't spend any time
> on microbenchmarks - there is a lot to do.
>
I'll leave the micro benchmark section then, and I will move them into a
separate directory. I'll add that to the "to-do". I'll also rename it.
>
>
>
> >
>
> http://cvs.php.net/viewvc.cgi/php-benchmarks/benchcli/tests/test_gaussjordan.php?view=markup&rev=1.1
> > Index: php-benchmarks/benchcli/tests/test_gaussjordan.php
> > +++ php-benchmarks/benchcli/tests/test_gaussjordan.php
>
>
> There are no comments in this file
> This is a bit "microbenchmark-y" for my liking. Is there a reason to
> include it?
>
We could either skip it totally or include it in the micro benchmark
directory. I would vote for inclusion in the micro benchmark directory since
it's written now, but if it's totally pointless, then it shouldn't be there
either.
>
>
>
> >
>
> http://cvs.php.net/viewvc.cgi/php-benchmarks/benchcli/tests/test_pcre.php?view=markup&rev=1.1
> > Index: php-benchmarks/benchcli/tests/test_pcre.php
> > +++ php-benchmarks/benchcli/tests/test_pcre.php
>
> This looks familiar, is it from Roadsend? Its origins (and possibly
> licence) may need to be documented.
> This isnt a bad microbenchmark for PCRE, but it should be separated
> out with other microbenchmarks.
>
This, as well as the the ackermann test is taken from roadsend. I'll add
origins (I don't know what license to write as it's a copy from the
roadsend). I'll also place it within the micro benchmark directory.
>
>
>
> Thanks,
> Paul
>
>
> On Sun, May 24, 2009 at 8:01 PM, Alexander Hjalmarsson <hjalle@php.net>
> wrote:
> > hjalle Sun May 24 19:01:25 2009 UTC
> >
> > Added files:
> > /php-benchmarks/benchcli bench.php
> > /php-benchmarks/benchcli/data pcre-data.xml
> > /php-benchmarks/benchcli/misc timer.php
> > /php-benchmarks/benchcli/tests test_ackermann.php
> > test_deltablue.php
> > test_gaussjordan.php test_pcre.php
> > test_raytrace.php
> > /php-benchmarks/benchcli/tests/raytracer Background.php Camera.php
> > Color.php Engine.php
> > IntersectionInfo.php
> > Light.php Ray.php
> > Scene.php Vector.php
> > base.php raytrace.php
> > /php-benchmarks/benchcli/tests/raytracer/Material BaseMaterial.php
> > Chessboard.php
> > Solid.php
> > /php-benchmarks/benchcli/tests/raytracer/Shape BaseShape.php
> > Plane.php
> Sphere.php
> > Log:
> >
> > The CLI-based benchmark
> >
> >
> > --
> > PHP Quality Assurance Mailing List
> > <http://www.php.net/>
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
>
> --
> Paul Biggar
> paul.biggar@gmail.com
>
>