Comparing version 0.0.47 to 0.0.48
@@ -1,2 +0,2 @@ | ||
/*! dw-cache v0.0.47 https://github.com/falsandtru/dw-cache | (c) 2021, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
/*! dw-cache v0.0.48 https://github.com/falsandtru/dw-cache | (c) 2021, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
(function webpackUniversalModuleDefinition(root, factory) { | ||
@@ -461,10 +461,9 @@ if(typeof exports === 'object' && typeof module === 'object') | ||
if (this.misses * 100 > LRU.length * this.block) { | ||
this.sweep ||= this.sweep = LRU.length * this.settings.sweep / 100 | 0 || 1; | ||
this.sweep ||= (LRU.length * this.settings.sweep / 100 | 0) + 1; | ||
if (this.sweep > 0) { | ||
this.sweep === 1 ? LRU.head = LRU.head.next : LRU.head = LRU.head.next.next; | ||
LRU.head = LRU.head.next.next; | ||
--this.sweep; | ||
this.sweep ||= -LRU.length * this.settings.sweep / 100 | 0; | ||
} else { | ||
this.sweep === -1 ? LRU.head = LRU.head.next : void 0; | ||
++this.sweep; | ||
@@ -471,0 +470,0 @@ } |
{ | ||
"name": "dw-cache", | ||
"version": "0.0.47", | ||
"version": "0.0.48", | ||
"description": "Dual window cache adaptively coordinates the ratio of LRU to LFU using the two sliding windows.", | ||
@@ -53,3 +53,3 @@ "private": false, | ||
"npm-check-updates": "^16.0.3", | ||
"spica": "0.0.589", | ||
"spica": "0.0.590", | ||
"ts-loader": "^9.3.1", | ||
@@ -56,0 +56,0 @@ "typescript": "4.7.4", |
@@ -57,5 +57,5 @@ # Dual Window Cache | ||
LRU hit rate 16.4% | ||
DWC hit rate 18.4% | ||
DWC - LRU hit rate delta 2.0% | ||
DWC / LRU hit rate ratio 112% | ||
DWC hit rate 18.0% | ||
DWC - LRU hit rate delta 1.6% | ||
DWC / LRU hit rate ratio 109% | ||
@@ -65,3 +65,3 @@ OLTP 500 | ||
DWC hit rate 28.9% | ||
DWC - LRU hit rate delta 5.5% | ||
DWC - LRU hit rate delta 5.4% | ||
DWC / LRU hit rate ratio 123% | ||
@@ -93,34 +93,34 @@ | ||
LRU hit rate 0.9% | ||
DWC hit rate 11.8% | ||
DWC - LRU hit rate delta 10.9% | ||
DWC / LRU hit rate ratio 1276% | ||
DWC hit rate 12.8% | ||
DWC - LRU hit rate delta 11.8% | ||
DWC / LRU hit rate ratio 1376% | ||
GLI 500 | ||
LRU hit rate 0.9% | ||
DWC hit rate 23.4% | ||
DWC - LRU hit rate delta 22.4% | ||
DWC / LRU hit rate ratio 2429% | ||
DWC hit rate 24.8% | ||
DWC - LRU hit rate delta 23.8% | ||
DWC / LRU hit rate ratio 2577% | ||
GLI 750 | ||
LRU hit rate 1.1% | ||
DWC hit rate 38.0% | ||
DWC hit rate 37.9% | ||
DWC - LRU hit rate delta 36.8% | ||
DWC / LRU hit rate ratio 3267% | ||
DWC / LRU hit rate ratio 3265% | ||
GLI 1,000 | ||
LRU hit rate 11.2% | ||
DWC hit rate 45.2% | ||
DWC - LRU hit rate delta 34.0% | ||
DWC / LRU hit rate ratio 403% | ||
DWC hit rate 46.1% | ||
DWC - LRU hit rate delta 34.9% | ||
DWC / LRU hit rate ratio 411% | ||
GLI 1,250 | ||
LRU hit rate 21.2% | ||
DWC hit rate 48.6% | ||
DWC - LRU hit rate delta 27.4% | ||
DWC / LRU hit rate ratio 228% | ||
DWC hit rate 48.7% | ||
DWC - LRU hit rate delta 27.5% | ||
DWC / LRU hit rate ratio 229% | ||
GLI 1,500 | ||
LRU hit rate 36.5% | ||
DWC hit rate 54.3% | ||
DWC - LRU hit rate delta 17.7% | ||
DWC hit rate 54.2% | ||
DWC - LRU hit rate delta 17.6% | ||
DWC / LRU hit rate ratio 148% | ||
@@ -131,3 +131,3 @@ | ||
DWC hit rate 54.7% | ||
DWC - LRU hit rate delta 9.7% | ||
DWC - LRU hit rate delta 9.6% | ||
DWC / LRU hit rate ratio 121% | ||
@@ -145,4 +145,4 @@ | ||
LRU hit rate 0.0% | ||
DWC hit rate 7.7% | ||
DWC - LRU hit rate delta 7.7% | ||
DWC hit rate 4.9% | ||
DWC - LRU hit rate delta 4.9% | ||
DWC / LRU hit rate ratio Infinity% | ||
@@ -152,4 +152,4 @@ | ||
LRU hit rate 0.0% | ||
DWC hit rate 20.2% | ||
DWC - LRU hit rate delta 20.2% | ||
DWC hit rate 19.7% | ||
DWC - LRU hit rate delta 19.7% | ||
DWC / LRU hit rate ratio Infinity% | ||
@@ -159,4 +159,4 @@ | ||
LRU hit rate 0.0% | ||
DWC hit rate 45.7% | ||
DWC - LRU hit rate delta 45.7% | ||
DWC hit rate 44.4% | ||
DWC - LRU hit rate delta 44.4% | ||
DWC / LRU hit rate ratio Infinity% | ||
@@ -166,4 +166,4 @@ | ||
LRU hit rate 0.0% | ||
DWC hit rate 46.0% | ||
DWC - LRU hit rate delta 46.0% | ||
DWC hit rate 62.0% | ||
DWC - LRU hit rate delta 62.0% | ||
DWC / LRU hit rate ratio Infinity% | ||
@@ -173,4 +173,4 @@ | ||
LRU hit rate 0.0% | ||
DWC hit rate 94.6% | ||
DWC - LRU hit rate delta 94.6% | ||
DWC hit rate 94.8% | ||
DWC - LRU hit rate delta 94.8% | ||
DWC / LRU hit rate ratio Infinity% | ||
@@ -177,0 +177,0 @@ |
76368
1288