Simple benchmark of LiveCode vs PHP
Simon Smith
hello at simonsmith.co
Tue Jun 17 16:42:56 EDT 2014
I have not seen any benchmarks comparing LiveCode server to other web
server languages so gave it a bash comparing it to PHP. I chose PHP as its
what I work with on a daily basis and the most popular of the server side
languages.
I probably should have used more complicated scripts aswell, which I will
probably do in the future. The web server was an entry level 512mb virtual
server from Digital Ocean. I am also a continent away from the server - so
my latency is pretty high.
I used the Apache ab program to run the tests.
As expected PHP yielded better results, but only by fractions of a second.
It is also running via an Apache process which is faster than CGI. This was
also run on a $5 a month VPS that is probably not very well suited for the
likes of Apache or testing load on.
While this is by no means a definitive benchmark and open for
interpretation, I think it does show that LiveCode delivers pretty great
performance as it is only slightly slower than PHP. I think it also shows
that LiveCode is a great option when approaching web projects - especially
if it lets you get the job done faster.
For the benchmark test, I used 2 simple loops:
LiveCode Server:
<?lc
put 0 into myVar
repeat for 100 times
add 1 to myVar
put myVar
end repeat
?>
PHP:
<?php
$myVar=0;
while($myVar < 100) {
$myVar ++;
echo $myVar;
}
?>
My latency to the server is about 234ms.
Concurrency Level: 5
LiveCode Results
Requests per second: 4.05 [#/sec] (mean)
Time per request: 246.952 [ms] (mean, across all concurrent requests)
PHP Results
Requests per second: 4.06 [#/sec] (mean)
Time per request: 246.063 [ms] (mean, across all concurrent requests)
Concurrency Level: 20
LiveCode Results
Requests per second: 3.95 [#/sec] (mean)
Time per request: 253.401 [ms] (mean, across all concurrent requests)
PHP Results
Requests per second: 4.02 [#/sec] (mean)
Time per request: 248.650 [ms] (mean, across all concurrent requests)
Simon
More information about the use-livecode
mailing list