21 May '13, 10pm

New blurrrrggghhhh post about why that benchmark is so crazy.

I posted a benchmark on twitter about comparing a DateTime with a string. This is a short blurrrggghhh post about the benchmark and why there is such a performance discrepancy. Here is the benchmark: require 'benchmark/ips' require 'active_support/all' if ENV['AS'] require 'date' now = DateTime.now Benchmark.ips do |x| x.report("lhs") { now == "foo" } x.report("rhs") { "foo" == now } end First we’ll run the benchmark without Active Support, then we’ll run the benchmark with Active Support. The Benchmarks Without Active Support [aaron@higgins rails (master)]$ bundle exec ruby argh.rb Calculating ------------------------------------- lhs 57389 i/100ms rhs 76222 i/100ms ------------------------------------------------- lhs 2020064.6 (±14.7%) i/s - 9870908 in 5.015172s rhs 3066573.4 (±13.2%) i/s - 15091956 in 5.012879s [aaron@higgins rails (master)]$ With Active Support [aaron...

Full article: http://tenderlovemaking.com/2013/05/21/one-danger-of-free...

Tweets

Scientists capture one of the world's rarest big cats on film (photos)

Scientists capture one of the world's rarest bi...

news.mongabay.com 21 May '13, 2pm

Crazy cat numbers: unusually high jaguar densities discovered in the Amazon rainforest (05/16/2013) Jaguars (Panthera onca...

Every restaurant should get one of these websites

Every restaurant should get one of these websites

domainnamewire.com 20 May '13, 3pm

A mobile friendly website for restaurants that doesn’t have any of my pet peeves. On Friday I received a press release fro...

of xbox one: Microsoft announced its newest gaming console, the Xbox One. Read more (Xbox One: Everything You...

of xbox one: Microsoft announced its newest gam...

lancerlord.blogspot.com 22 May '13, 2pm

Microsoft announced its newest gaming console, the Xbox One. Read more (Xbox One: Everything You Need to Know About Micros...

12 Ways To Increase Your New Blog Post Readersh...

aspirantsg.com 19 May '13, 11pm

In reality, the only people who will probably know about your latest blog post is you and your RSS subscribers. It takes a...