justforkicks1 Posted November 30, 2010 Share Posted November 30, 2010 Question: I have a PHP script that can finish running within 7 minutes on a 2008 Mac Book Pro Laptop running Windows XP . The Mac book pro is core 2 duo 2.5 GHz with 2 gbs of ram. How ever when I run the same script on a Dell Desktop Windows XP 2010 computer it takes 15 to 30 minutes to finish. Stats for the Dell are Intel core 2 duo CPU e7500, 2.93 GHz with 1.93 gbs of ram. Why does the Mac runs the PHP so much faster ? How does a 2 yr old Laptop bests a brand new desktop in running PHP ? Thank you for your answers. Quote Link to comment https://forums.phpfreaks.com/topic/220186-question-why-not-so-fast/ Share on other sites More sharing options...
requinix Posted November 30, 2010 Share Posted November 30, 2010 Execution time is so much more complicated than just "lol i haz fast cpu and lotsa ram". What does the script do? Does it involve network connections? Disk access? Database access? Does it use output from other programs? How much code is userland and how much isn't? Are the PHP versions very different? Which extensions are installed? Running as a command-line script? CGI or FastCGI program? Apache module or ISAPI filter in IIS? Do you get the picture? Quote Link to comment https://forums.phpfreaks.com/topic/220186-question-why-not-so-fast/#findComment-1141150 Share on other sites More sharing options...
justforkicks1 Posted November 30, 2010 Author Share Posted November 30, 2010 I appreciate the information, thank you. I went back and checked. The PHP working environments are exactly the same i.e. both PHP.ini files are the same, extensions used are the same ect... No it does not involve network connections or database use. There is no out put from other programs and no PHP userland. I have the exact same PHP versions 5.2.9 and same exact extension are installed. I execute PHP scripts from the MSDOS command line interface. Not using any servers. What the script does is it copies the information from several files into one file. It then reads that information into an array and uses array_count_values to set up an array_key_exists search. If it is found number is appended to a file. The data sets are about a million numbers and this is repeated about 150 times. If the PHP environments are the same and I am not using servers what else could be affecting the computer to make PHP run 2-3 times slower than on the other computer. Quote Link to comment https://forums.phpfreaks.com/topic/220186-question-why-not-so-fast/#findComment-1141444 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.