Created
April 24, 2009 13:01
-
-
Save francois/101095 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| $ ruby19 -v | |
| ruby 1.9.1p0 (2009-01-30 revision 21907) [i386-darwin9.6.0] | |
| $ irb19 | |
| > puts Benchmark.realtime { 10000.times { Time.mktime(2008, 7, 15, 0, 0, 0) } } | |
| 0.101713895797729 | |
| > puts Benchmark.realtime { 10000.times { Date.civil(2008, 7, 15) } } | |
| 0.100281000137329 | |
| (posted here because http://blog.pluron.com/2009/04/ruby-date-class.html did not accept my comment) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment