-
-
Save Domon/900433 to your computer and use it in GitHub Desktop.
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
heffalump:~ james$ ruby -v | |
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-darwin10.7.1] | |
heffalump:~ james$ php -v | |
PHP 5.3.4 (cli) (built: Jan 17 2011 21:54:20) | |
Copyright (c) 1997-2010 The PHP Group | |
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies | |
heffalump:~ james$ cat foo.rb | |
msg = "Hello world" | |
100000.times do | |
puts <<EOF | |
<html><body>#{msg}</body></html> | |
EOF | |
end | |
heffalump:~ james$ time ruby foo.rb >/dev/null | |
real 0m0.089s | |
user 0m0.082s | |
sys 0m0.003s | |
heffalump:~ james$ cat foo.php | |
<?php | |
$message = "Hello world"; | |
for($i=0;$i<100000;$i++) { | |
?> | |
<html><body><?= message ?></body></html> | |
<?php } ?> | |
heffalump:~ james$ time php foo.php >/dev/null | |
real 0m0.272s | |
user 0m0.144s | |
sys 0m0.126s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment