Hacker News new | ask | show | jobs
by bigdubs 4292 days ago
i re-wrote it to just loop over the urls and fetch, results below.

>> time ruby parallel.rb http://google.com: 301 Moved Permanently http://grantland.com: 200 OK http://espn.go.com: 200 OK http://www.cnn.com: 200 OK

real 0m0.595s user 0m0.099s sys 0m0.045s

~/code/ruby >> time ruby serial.rb http://www.cnn.com: 200 OK http://espn.go.com: 200 OK http://grantland.com: 200 OK http://google.com: 301 Moved Permanently

real 0m1.495s user 0m0.116s sys 0m0.053s