On Dec 19, 4:48 am, Szymon Piłkowski <[email protected]>
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?

What is "out-smarting" the compiler, really?  I often get criticized
for the following style of for loop:

for (var i=0, n=arr.length; i<n; i++)

On the grounds that I'm trying to outsmart the compiler.  I'm
certainly not trying to do that.  Rather I'm formulating a legal for
loop, *and* obviating a property access on every iteration, because
the language spec tells me the second chunk will get executed each
time.

If a compiler barfs on the above, shame on whoever wrote the compiler.

-- 
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/[email protected]/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/[email protected]/

To unsubscribe from this group, send email to
[email protected]

Reply via email to