Constant vs Function

Benchmark created on


Setup

const VALUE = { a: 1, b: 2, c: 3 };
const getValue = () => VALUE;

Test runner

Ready to run.

Testing in
TestOps/sec
Constant
let val = VALUE;
ready
Function
let val = getValue();
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.