Re: [PHP] PHP console script vs C/C++/C#
- Date: Fri, 18 Apr 2008 15:06:35 +0200
- From: Per Jessen <per@xxxxxxxxxxxx>
- Subject: Re: [PHP] PHP console script vs C/C++/C#
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
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php