Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ahmednuaman
Visitor

Performance of function expressions vs statements

Are there any performance gains/losses in using function expressions vs statements? In JS there's recently been a push towards using statements as it avoids hoisting and makes the code more semantic, eg not executing a function before it's declared. There's also a handy perf test: http://jsperf.com/fn-expression-vs-statement but the performance difference on modern browser isn't much.

How about on Roku boxes? Is it more performant to use:

sub Main()
print "I can haz app"
end


Or

Main = function()
print "I can haz app"
end


Otherwise are there any benchmark tools available to allow me to performance test these boxes?
0 Kudos