Homebrew is a great little package manager for OS X. If you haven't already, installing it is pretty easy:
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
/** | |
* Write a function that, given two objects, returns whether or not the two | |
* are deeply equivalent--meaning the structure of the two objects is the | |
* same, and so is the structure of each of their corresponding descendants. | |
* | |
* Examples: | |
* | |
* deepEquals({a:1, b: {c:3}},{a:1, b: {c:3}}); // true | |
* deepEquals({a:1, b: {c:5}},{a:1, b: {c:6}}); // false | |
* |
Latency Comparison Numbers | |
-------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
require 'csv' | |
require 'json' | |
require "set" | |
json = JSON.parse(File.open(ARGV[0]).read)["results"] | |
# Pass 1: Collect headings | |
headings = SortedSet.new | |
json.each do |hash| | |
headings.merge(hash.keys) | |
end |