i’ve made a little script to calculate prime numbers, i’m using the latest xampp (x86) on win7 (x64) and the script used about 25% of cpu and completed on 2min, i’ve tried the latest wampserver (x64) and using the same 25% of cpu it somehow takes more than double the time to finish. on both xampp and wampserver, when i open the same file a lot of times it keeps on 25%, if i make 4 different files with the same script but different names and open all 4 the cpu goes to 100% and the temps increase pretty much the same as running prime 95.
i would like to do this prime number calculations in a way that it would take 100% of the cpu (or a bit less if not possible) running a single script, any ideas?
i will start learning c++ and for this kind of stuff i think it would be better suited but i know php and i would like to do it using it, maybe later i will do the same or better but using c++.
i think it’s not possible not even heard of something like this but if i could run two blocks of code simultaneosly on the same php script maybe it would do the trick (or not considering that this seems to me like a pretty ‘artificial’ limit that can be ‘set/removed’, i may be wrong so hear your opinions on this will be good).
also, any theories on why is wampserver so slow compared to xampp (both with nothing more installed and both with default settings), also some good tips to speed them up would be nice, i mean, wamp should at least be able to keep up more or less with xampp(there isn’t a big difference on the stuff one installs and the other)?
To max out the server you need to increase the max execution time of php to something really big but I also suggest to run the script from the command line because apache can make a big difference. Try running lighttpd with fast-cgi it makes a big difference.