Click to See Complete Forum and Search --> : PHP4 vs C++ for performance
mod_frank
04-17-2003, 01:22 AM
I have a server which is going to run my website and it is not powerful at all. It has a 233 mhz processor and will be running 2000 server. I am looking for the best performance possible so I naturally went to php. I also work with a gentlemen who writes his pages using c++. My question is will the performance difference be large enough that I will notice the difference if I use c++ for my database work over php4?? Any other suggestions would be great...
Thanks,
-mod_frank
rklapwijk
04-17-2003, 07:39 AM
You don't have to worry that much about your server power, i've got a P3 600mhz with 128 MB Ram, works as great as my other P4 2,4 with 768 MB Ram.
I don't think the difference will be huge, i haven't tried c++ on my systems, but you could use php & mysql. It's powefull, fast and stable. Like i said, i haven't tried c++ myself so i recommend it to try it yourself
DangerousDave86
05-10-2003, 10:47 AM
The difference could be quite a bit, the reasoning behind this is that C++ is a compiled language and PHP is an interpreted language. The C++ is run instantly, while the PHP is checked for syntax, then compiled, then run (I believe this is how it is done). So there is quite a bit of extra work being done. You could write some programs in both and then add debug timers, to see which is fastest or more efficient.
anyway hope this helps
--- Dave
PHP Builder
Copyright WebMediaBrands Inc. All Rights Reserved.