Re: PHP console script vs C/C++/C#
| From: | Per Jessen | Date: | Fri, 18 Apr 2008 13:06:35 +0000 |
| Subject: | Re: PHP console script vs C/C++/C# | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-273223@lists.php.net to get a copy of this message | ||
Daniel Kolbo wrote:
> 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)?
You haven't given us much to work with, so it's a wild guess, but I
think you'd probably be able to cut your runtime by half or more.
I recently wrote a multi-threaded postgrey daemon in C as the original
postgrey (written in perl) was taking up far too much CPU. With high
concurrent load (2000 clients or more), the original postgrey would
easily take 70-80% of the CPU, and I would see lots of timeouts.
My new daemon takes up less than 10% CPU under the same load and I've
not seen a timeout yet.
/Per Jessen, Zürich