function declaration and function expression performance difference
I have used JSperf to test a small sample of code . According to a few articles I came across, both should have similar performance with test2 having a little edge. But here it's the complete opposite. Can someone explain why the huge difference? Edit : I also understand the differences between both of them. Please don't mark this as a duplicate of this or other questions which talk about the semantic differences and do not answer my question regarding performance. Thank you. With the powerful optimizations JavaScript engines are using these days, Micro-benchmarks like this produce somewhat