Thursday, August 18, 2005

About Apress Contest and PHP Fractal Generator


Apress has announced a Programming Contest on mandelbrot Fractal Generation.
There are there proramming groups:
  • C++, C
  • Perl, PHP, Python, Common Lisp
  • Java, C#, VB.NET
The fastest program in each group will win a SONY Playstation, the second will win a iPod Shuffle.
I feel excited because one can use PHP to do it. Since I am not used to C++, I choose PHP and start coding.
The result was quite dissapointed. For an image of 320x200, with number of itterations is 200, it take > 20 second. (!) The same code written in C++ has much larger speed, though I cannot calculate exact number. I tried to optimized a lot, and the speed may increase nearly two times, but still too slow. I wonder what wrong with PHP loop and not sure about the performance of other languge in the group (perl, phython,...)
At last, I submit the program althogh I can optimize it a litle more. Anyway, as the rule, I will expose the code after the contest finish.
If anyone interested, you can still apply, since the deadline is August 31.
Go to the website for more information

No comments: