On Friday 28 June 2002 09:00, Norihisa Washitake wrote: > Hi all, > > PHP is usually thought to be faster than perl, but sometimes PHP > runs slower than perl in some cases.
Depends on what you use PHP and Perl for. I tend to use PHP for websites and Perl for system admin tasks. > Belows is the example program in both PHP and Perl languages. > This solves "x^2 + y^2 + z^2 = 32" and shows an array of (x, y, z) > candidates. This program runs 1000 times for timekeeping. [snip] > Hey, perl is much faster, isn't it? :-( Yeah, but it's not exactly your typical web application is it? > Is there any better way (i mean, better performance) to improve this? There was a discussion here some weeks ago where it was said that the looping code in PHP is slower than that of Perl. > ...or, we have to declare Perl the winner sometimes? You can. But that's just to be expected. No language (to date) can be the best at everything, so that's why you have a choice and hopefully pick the right tool for the job on hand. -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* Ever feel like life was a game and you had the wrong instruction book? */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php