• R/O
  • SSH

fcf-framework-core: Commit

Main functions and classes of the FCF framework


Commit MetaInfo

Révision90f7f1988067f63790354cf5fd571f8c9cd0c68b (tree)
l'heure2022-12-05 12:07:44
Auteurvmarkin
Commitervmarkin

Message de Log

renamed Cache to SimpleCache

Change Summary

Modification

diff -r 8d18f17989f6 -r 90f7f1988067 fcf.js
--- a/fcf.js Mon Dec 05 06:04:58 2022 +0300
+++ b/fcf.js Mon Dec 05 06:07:44 2022 +0300
@@ -1896,15 +1896,16 @@
18961896
18971897 /// @class fcf.Cache
18981898 /// @brief A simple class for caching results
1899- fcf.Cache = class {
1899+ /// @test
1900+ // Updating an item in a cache with 1MB (a_mcapacity) (2912 items) takes approximately ~2 us
1901+ // (keys and values: 0 - 1000000 as string).
1902+ // Updating an item in a cache with 0.1MB (a_mcapacity) (284 items) takes approximately ~0.4 us
1903+ // (keys and values: 0 - 1000000 as string).
1904+ // OS: LINUX
1905+ // Node version: v18.11.0:
1906+ // CPU: Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz
1907+ fcf.SimpleCache = class {
19001908
1901- // Updating an item in a cache with 1MB (a_mcapacity) (2912 items) takes approximately ~2 us
1902- // (keys and values: 0 - 1000000 as string).
1903- // Updating an item in a cache with 0.1MB (a_mcapacity) (284 items) takes approximately ~0.4 us
1904- // (keys and values: 0 - 1000000 as string).
1905- // OS: LINUX
1906- // Node version: v18.11.0:
1907- // CPU: Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz
19081909 constructor(a_mcapacity, a_capacity){
19091910 this._mcapacity = !isNaN(a_mcapacity) && parseInt(a_mcapacity) > 0 ? a_mcapacity : 1000000;
19101911 this._capacity = !isNaN(a_capacity) && parseInt(a_capacity) > 0 ? a_capacity : Infinity;
Afficher sur ancien navigateur de dépôt.