cooldude832 Posted June 23, 2007 Share Posted June 23, 2007 Lets say (hypothethically) I have an array of 2000 numbers and I need to perform 1000 actions on these numbers. and my server allows me to upload c/c++ scripts. Would it be faster to use php to do the 2 million math operations or allow C/C++ to run it and use the return of that as the done function. I'm not asking is C/C++ faster than php i'm asking is the bonus from going to C/C++ enough to compensate for the function exec() Quote Link to comment https://forums.phpfreaks.com/topic/56858-which-is-fast-for-math-purposes/ Share on other sites More sharing options...
Barand Posted June 23, 2007 Share Posted June 23, 2007 Whenever I'm faced with such a dilemma I try it both ways and time it (www.php.net/microtime) But my money's on compiled C++ code rather than an interpreted script. Quote Link to comment https://forums.phpfreaks.com/topic/56858-which-is-fast-for-math-purposes/#findComment-281022 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.