Created
September 29, 2011 07:22
-
-
Save joecorcoran/1250175 to your computer and use it in GitHub Desktop.
cities gem: YAML vs JSON
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
10.times { City.cities_in_country("RU") } | |
Benchmark.bm | |
------------ | |
user system total real | |
JSON 33.210000 0.630000 33.840000 ( 33.872267) | |
YAML 78.530000 3.230000 81.760000 ( 81.758585) | |
Benchmark.bmbm | |
-------------- | |
user system total real | |
JSON 30.160000 0.320000 30.480000 ( 30.418316) | |
YAML 67.870000 3.010000 70.880000 ( 70.767640) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
JSON: parsing JSON files using Yajl::Parser
YAML: parsing YAML files using YAML#load_file