More accurately, the more type stable the code is, the easier it is for the engine. In other words, don't reuse a variable that used to hold a number and assign it an object, then a string, then a function, etc....
On Dec 19, 3:48 am, Szymon Piłkowski <szymon.pilkow...@gmail.com> wrote: > Hello, > > So, we've got new javascript engines (v8/jagermonkey), which will use > JIT compilers to do their magic and optimise performance of our core. > The question is: should we still use our own magic to do the same job, > or should we start being nice to the compilers and leave such problems > to them? > From what I understand, the more obvious the code is, the easier it is > to trace for a JIT engine. Performance-wise tricks often obscure the > code, telling the compiler something like "hey, I'm doing my magic > here, don't interfere". > (I'm speaking mostly about such things as reverse-loops, unwinded > loops, bitwise tricks or reducing the scope chain with caching) > Do you know any edible resources covering this subject? > > By the way, as this is my first email here, hello everyone. :) > > -- > Szymon Piłkowski -- To view archived discussions from the original JSMentors Mailman list: http://www.mail-archive.com/jsmentors@jsmentors.com/ To search via a non-Google archive, visit here: http://www.mail-archive.com/jsmentors@googlegroups.com/ To unsubscribe from this group, send email to jsmentors+unsubscr...@googlegroups.com