Hi, Can you guys help me determine the performance difference of each of these statements? Which one would you use?
Making a new Array using
- var new_list = new Array(); or - var new_list = []
Appending element using
- push('a')
- new_list[i]; (if i know the length)
Ternary operator or if() {} else (){}
Trying to make isodd function, which is faster
(! (is_even)) or (x%2!=0)foreach or normal iteration
one more
- a= b = 3; or b=3; a=b;
[edit: Im making a Math Library. So any performance hacks discussions are also welcome :) ]
Thanks for your help.