- ๐ญ Iโm currently working on Tablesmith, a privacy-first, cross platform spreadsheet ETL app
yiling-j / theine-core Goto Github PK
View Code? Open in Web Editor NEWtheine-py rust core
License: BSD 3-Clause "New" or "Revised" License
theine-py rust core
License: BSD 3-Clause "New" or "Revised" License
Greetings! I see on https://pypi.org/simple/theine-core/ that there are several architectures supported, but for arm64 there's only macos support, but no linux support. Can you please add linux-arm64 target?
currently tlfu and timerwheel store keys separately in hashmap/lru, the duplication of keys may use more memory if cache size is large or key string is long.
I got the following error while writing unit-tests. Interestingly I got the error only with size=1
or size=2
. So I hope it only impacts testing and not real life, but that's still unexpected.
from datetime import timedelta
from theine import Cache
def test(size):
cache = Cache('tlfu', size)
# set 1 and get it many times to make it the most frequently used
cache.set(1, 1, timedelta(seconds=1000))
for _ in range(10 * size):
assert cache.get(1) == 1
# fill the cache with keys that are never read again
for i in range(10 * size):
cache.set(i, i, timedelta(seconds=1000))
# get 1 again
# note that I do not get the panic error if you remove the next line
assert cache.get(1) == 1
# try to write dummy keys again
for i in range(10 * size):
cache.set(i, i, timedelta(seconds=1000))
test(2) # raises
test(3) # ok
raises:
thread '<unnamed>' panicked at 'link id not match', src/metadata.rs:159:13
stack backtrace:
[...]
10: 0x1022dcd63 - core::panicking::panic_fmt::hc10ef4c7e7c3da2e
11: 0x102290ac5 - theine_core::metadata::Link::remove_wheel::hac48c6eac45dc96a
12: 0x10228dfbb - theine_core::core::TlfuCore::set::h794298ae1966b4d2
13: 0x10228b809 - std::panicking::try::hec7d762371985e37
[...]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.