Feature/fix perf

/to @ritch 
/to @bajtos 

Here are a few patterns I use:

1. Convert array.forEach(fn) to for(var k = 0; k < keys.length; k++) {...};
See: http://jsperf.com/fast-array-foreach

2. Avoid Object.defineProperty()
See: http://jsperf.com/object-defineproperty-vs-definegetter-vs-normal/21

3. Avoid array.indexOf() 
I believe the SL coding style is `function(...)`, not `function()`. If you are using WebStorm, there is a setting for that: 
```
Code Style > JavaScript > Spaces > Before Parentheses > In function expressions
```