[asterisk-users] Benchmarking AGI performance in C, PHP, and Perl

Danny Nicholas danny at debsinc.com
Tue Jul 12 09:35:08 CDT 2011


Let's make this a "Spider-man" contest.  The No-prize will be the
satisfaction of seeing how it actually works.  Write stevestest.agi in Perl,
PHP and C.  The program must load the AGI variables, do a MYSQL QUERY and a
MYSQL INSERT.  Post your source and results using this methodology:
time for i in `seq 1000`; do ./stevestest.out ; done - C
time for i in `seq 1000`; do php stevesetest.php '; done - PHP
time for i in `seq 1000`; do perl stevestest.pl ; done

Any takers?


-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Matt Riddell
Sent: Monday, July 11, 2011 5:07 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Benchmarking AGI performance in C, PHP, and
Perl

On 12/07/11 9:29 AM, Steve Edwards wrote:
> Many times, I've made the statement that you can execute hundreds of 
> AGIs written in C in the time it takes to load an interpreter and 
> parse a script written in PHP or Perl.

It would be interesting to see the same types of tests run against fast-agi
- personally if I write an agi that will be called 1000 times I'm going to
leave it running and have network requests against it rather than starting
and stopping every time.

Interesting tests nonetheless - I would have been pretty concerned if
straight C wasn't faster :-)

Mind if I post it to the Daily Asterisk News?

--
Cheers,

Matt Riddell
_______________________________________________

http://www.venturevoip.com/news.php (Daily Asterisk News)
http://www.venturevoip.com/exchange.php (Full ITSP Solution)
http://www.venturevoip.com/cc.php (Call Centre Solutions)

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to
Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users




More information about the asterisk-users mailing list