Please refer to existing benchmarks
Like this one on jsperf.com I found typing "`[].slice performance" on google.
Revision 15 of the same benchmark also provides a wide variety of approaches, while revision 12 was also interesting for me.
What code to use
As @Barmar pointed out on comments, [].slice.call
is shorter than Array.prototype.slice.call
, so it's pretty common to see the former.
As @t.niese pointed out on comments, [].slice.call
creates a object that is never used, even though it most likely would not have noticeable performance impacts.
IMHO, if worried about performance, I prefer creating a shortcut with bind
on an outer scope and then use it, instead shortcuting Array.prototype.slice.call
with [].slice.call
:
var slice = Function.prototype.call.bind( Array.prototype.slice );
// and then just
function doSomething( ){
slice( arguments );
slice( arguments, 1, -1 );
}
slice( whatever );
slice( whatever, 0, 3 );
// and so on
Conclusions
Definitely, as seen on benchmarks, performance is not the same.
When performance really matters, just benchmark your code to optimize it according to your requeriments.
When performance does not matter enought to worry about a small improvement like this one, it's a code style related decision, so pick your personal preference or follow the code style guide of the project you are working at.
Side note
@Barmar posted a link on comments about Premature Optimization really interesting too.