Skip navigation

Monthly Archives: June 2012

This blew my mind. I was looking at some code that had vars named like thing_x and thing_y, then thought, rather reflexively, "those should just be a single object or array var". The kind of thinking that comes along with the "all vars are objects" mentality of JS. If there was a difference, I thought, it should be nominal.

I was wrong. So wrong. I wasn’t expecting this kind of disparity. The difference in V8 is downright astounding.

jsPerf: Separate Vars vs Container Object