Skip to content

Commit 9f22fe9

Browse files
committed
Updating perf benchmarks
1 parent 3eeb1fc commit 9f22fe9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

benchmarks/performance-observer-benchmark.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ async function runPerformanceObserverBenchmarks () {
9292

9393
// Phase 1: Fill cache with initial data
9494
console.log("Phase 1: Initial cache population");
95+
const phase1Cache = lru(cacheSize);
9596
let phase1Index = 0;
9697
await timer.timeFunction("lru.set (initial population)", () => {
97-
const phase1Cache = lru(cacheSize);
9898
const i = phase1Index % cacheSize;
9999
phase1Cache.set(testData[i].key, testData[i].value);
100100
phase1Index++;
@@ -198,7 +198,7 @@ async function runPerformanceObserverBenchmarks () {
198198
}, iterations);
199199

200200
// expiresAt()
201-
const expiresCache = lru(cacheSize, 5000);
201+
const expiresCache = lru(cacheSize, 6e4);
202202
const expiresKey = "expires_key";
203203
expiresCache.set(expiresKey, "expires_value");
204204
await timer.timeFunction("lru.expiresAt", () => {

0 commit comments

Comments
 (0)