On Thu, Apr 17, 2008 at 5:30 PM, Daniel Kolbo <kolb0057@xxxxxxx> wrote: > Hello, > > I am writing a PHP script for a local application (not web/html based). My > script is taking a longer time to execute than I want. The source code is a > few thousand lines, so I will spare you all this level of detail. > > I prefer to write in PHP because that is what I know best. However, I do > not think there is anything inherent with my script that requires PHP over > C/C++/C#. > > If I wrote the console application in a c language (and compiled) would one > expect to see any improvements in performance? If so, how much improvement > could one expect (in general)? > > I assume because php is not compiled that this real time interpretation of > the script by the zend engine must take some time. This is why I am > thinking about rewriting my whole script in a C language. But before I > begin that ordeal, i wanted to ask the community for their opinions. If you > think using a c language would suit me well, what language would you > recommend? > > My google and mail archive searching for this yielded mainly PHP for web > apps, so I am asking all of you. > > My main question is, how much of an improvement in performance will one see > by using a compiled version of an application versus using a scripted > version of an application? > > I looked at PHP's bcompiler, but the documentation is minimal so I am > hesitant to dig much deeper into that, unless someone strongly suggests > otherwise. > > Thank you PHPeeps, > DanK > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > You might take a look at this: http://us2.php.net/manual/en/function.apc-compile-file.php I'm not sure if that works on the cli version though. If you wanted to start making your app faster, just find where your real bottlenecks are and you can migrate those specific chunks into extensions. Like for instance if your app does a lot of text processing, you can migrate that specific set of functions into c since it will be much faster. If the whole thing is just really slow maybe you should consider why you've got such a heavy program. Good luck on your choice! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php