Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
dasdasasdasdasdfsdfasdasd
(version: 0)
higher order function vs simple function perf check
Comparing performance of:
simple function vs higher order function
Created:
5 years ago
by:
Guest
Jump to the latest result
Tests:
simple function
var artifacts = { getById: () => [] } const flatten = (artifacts, artifactId) => { const foo = (artifactId) =>{ return artifacts.getById(artifactId); } return [ ...foo(artifactId) ] } for(var i = 0; i < 100; i++) { flatten(artifacts, i) }
higher order function
var artifacts = { getById: () => [] } const createFlattenr = (artifacts) => { const getDependencies = (artifactId) => artifacts.getById(artifactId); return (artifactId) => { return [ ...getDependencies(artifactId) ] } } const flatten = createFlattenr(artifacts) for(var i = 0; i < 100; i++) { flatten(i) }
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
simple function
higher order function
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!
Related benchmarks:
Lazy test vs call
Lazy test vs call
noop vs conditional execution
noop vs conditional execution (fixed)
Factorial math
Comments
Confirm delete:
Do you really want to delete benchmark?