MCPcopy Index your code
hub / github.com/nodejs/node / main

Function main

benchmark/buffers/buffer-compare.js:30–41  ·  view source on GitHub ↗
({ n, size })

Source from the content-addressed store, hash-verified

28});
29
30function main({ n, size }) {
31 const b0 = Buffer.alloc(size, 'a');
32 const b1 = Buffer.alloc(size, 'a');
33
34 b1[size - 1] = 'b'.charCodeAt(0);
35
36 bench.start();
37 for (let i = 0; i < n; i++) {
38 Buffer.compare(b0, b1);
39 }
40 bench.end(n);
41}

Callers

nothing calls this directly

Calls 4

allocMethod · 0.80
compareMethod · 0.65
startMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…