Re: Re: [PHP-QA] [benchmarks] v8-raytrace proposal
| From: | idaf1er at gmail dot com | Date: | Tue, 28 Apr 2009 15:13:15 +0000 |
| Subject: | Re: Re: [PHP-QA] [benchmarks] v8-raytrace proposal | ||
| References: | 1 | Groups: | php.qa |
| Request: | Send a blank email to php-qa+get-64812@lists.php.net to get a copy of this message | ||
Thanks Paul,
Yes it was my plan to propose to add it in the repository.
There is some differences between my version and the javascript version :
1) The version in javascript include http://www.prototypejs.org/ 1.5, but is not needed by the benchmark
I just removed from the source.
2) I replaced all calls to "canvas" with equivalent in GD
the benchmark himself don't produce an image, but the code is able to do it. I use it to be able to compare the result between the javascript version and the php version.
3) Concerning the execution: it exist 2 version of the script in javascript.
v8 : http://code.google.com/p/v8/source/browse/trunk/benchmarks/raytrace.js
sunspider: http://svn.webkit.org/repository/webkit/trunk/SunSpider/tests/v8-raytrace.js
The v8 benchmark use a system of 'BenchmarkSuite' to execute it.
And SunSpider only execute renderScene() 6 times.
I used the version of sunspider.
4) I added a piece of code to display the time used to execute :
$start = microtime(true);
for ($i = 0;$i<6; $i++){
renderScene();
}
$usec = microtime(true) - $start;
echo ($usec * 1000).'ms'. PHP_EOL;
Concerning the licence I don't find it, on the V8 or Sunspider repository. The script is based on the work of http://labs.flog.co.nz/raytracer/
And I don't have idea wich license, I can apply. But it's already free to use, distribute and modify.
Davide
On Apr 28, 2009 11:56am, Paul Biggar <paul.biggar@gmail.com> wrote:
Hi Davide,
This is fantastic, thank you. I have added this to the benchmark
repository (I presume this was the plan?). I have a few questions:
- Is this a straight port of the v8-raytrace? I believe the
v8-raytrace did some things on screen, can you comment on what you did
instead (I have only glanced at the code)?
- I dont see any licencing headers. What licence was the v8 version?
What will we do here?
Thanks for this fantastic work,
Paul
On Sun, Apr 26, 2009 at 5:43 PM, Davide Mendolia idaf1er@gmail.com> wrote:
Hi,
In the context of http://wiki.php.net/rfc/better_benchmarks.
I want to propose a PHP version of v8-raytrace benchmark.
You can find it at http://idaf1er.googlepages.com/raytracer.tar.gz
Or http://idaf1er.googlepages.com/raytracer.phar in the phar format
Have a nice day
--
Davide Mendolia
--
Paul Biggar
paul.biggar@gmail.com