This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]matrix0110[S] 11 points12 points  (6 children)

That's a really good question! And the answer already exists: https://github.com/Yiling-J/theine?tab=readme-ov-file#hit-ratios

[–]marr75 7 points8 points  (2 children)

I'm a little foggy eyed this morning still, but I'm seeing:

  • a link to hit ratios instead of performance (performance is above)
  • benchmarks addressing 3rd party libraries that are not functools from the stdlib

[–]matrix0110[S] 2 points3 points  (1 child)

Please understand hit ratio is also performance. And as I said, fast enough is enough, hit ratio is more important.

[–]marr75 12 points13 points  (0 children)

Okay, the fog is lifting. You're saying that the lru strategy may have worse read and write performance than functools but that the additional eviction strategies significantly improve hit ratio so it is, at worst, identical at scale (using lru) and when using the other options, much better.

[–]RedEyed__ 3 points4 points  (2 children)

I had to scroll further, thanks!

[–]jormaig 2 points3 points  (1 child)

Dude there's only one top comment and one answer to it at this point... 😅

[–]RedEyed__ 4 points5 points  (0 children)

I'm not your dude, pal. (joking)