Re: 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

From: Date: Mon, 25 May 2009 11:02:07 +0000
Subject: Re: 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
Groups: php.qa 
Request: Send a blank email to php-qa+get-65010@lists.php.net to get a copy of this message
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...) > > 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. > > http://cvs.php.net/viewvc.cgi/php-benchmarks/benchcli/tests/test_ackermann.php?view=markup&rev=1.1 > 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/ > 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. > > 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? > > 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. 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

« previous php.qa (#65010) next »