regularjs/regular

减少_.extend的使用

Closed this issue · 0 comments

众所周知,在部分浏览器会对一些对象做Hash化"hash table mode" 优化(比如动态增加太多字段),如果在这些对象进行for in 操作并不是明智的, 而在Regularjs中大量应用了_.extend(它之中应用了for .. in ), 由于有些对象是开发者在使用中传入的,并且是用来承载数据的(比如data), 所以带来了客观的性能损耗