Created
April 3, 2011 07:24
-
-
Save afutseng/900263 to your computer and use it in GitHub Desktop.
response to https://gist.github.com/900008
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Linux carglecloud0 2.6.32-21-server #32-Ubuntu SMP Fri Apr 16 09:17:34 UTC 2010 x86_64 GNU/Linux | |
Ubuntu 10.04.1 LTS | |
Welcome to the Ubuntu Server! | |
* Documentation: http://www.ubuntu.com/server/doc | |
System information as of Sun Apr 3 15:39:25 CST 2011 | |
System load: 0.0 Swap usage: 0% Users logged in: 0 | |
Usage of /: 0.3% of 905.57GB Temperature: 30 C | |
Memory usage: 30% Processes: 127 | |
Graph this data and manage this system at https://landscape.canonical.com/ | |
Last login: Tue Mar 22 11:51:47 2011 from carglecloud1 | |
afu@carglecloud0:~$ ruby -v | |
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-linux] | |
afu@carglecloud0:~$ php -v | |
PHP 5.3.2-1ubuntu4.5 with Suhosin-Patch (cli) (built: Sep 17 2010 13:49:46) | |
Copyright (c) 1997-2009 The PHP Group | |
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies | |
afu@carglecloud0:~$ cat foo.rb | |
msg = "Hello world" | |
100000.times do | |
puts <<EOF | |
<html><body>#{msg}</body></html> | |
EOF | |
end | |
afu@carglecloud0:~$ cat foo.php | |
<?php | |
$message = "Hello world"; | |
for($i=0;$i<100000;$i++) { | |
?> | |
<html><body><?= $message ?></body></html> | |
<?php } ?> | |
afu@carglecloud0:~$ cat foo-ng2.php | |
<?php | |
$message = "Hello world"; | |
for($i=0;$i<100000;++$i) { | |
echo <<<EOF | |
<html><body>$message</body></html> | |
EOF; | |
} | |
afu@carglecloud0:~$ time ruby foo.rb >/dev/null | |
real 0m0.072s | |
user 0m0.070s | |
sys 0m0.000s | |
afu@carglecloud0:~$ time php foo-ng2.php >/dev/null | |
real 0m0.052s | |
user 0m0.050s | |
sys 0m0.000s | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment