Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Function.prototype.apply() VS argument spread
(version: 1)
Comparing performance of:
apply vs spread
Created:
3 months ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
function hurrr() { this.echo = 'oi ' } hurrr.prototype.do = function() { return this.echo + arguments[0] } hurrr.prototype.doSpread = function() { return this.do(...arguments) } hurrr.prototype.doApply = function() { return this.do.apply(this, arguments) } let toDo = ['hui', 'pizda', 'nikita', 'jigurda'] let durrr = new hurrr()
Tests:
apply
durrr.doApply()
spread
durrr.doSpread()
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
apply
spread
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Comments
Confirm delete:
Do you really want to delete benchmark?