V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  Nazz  ›  全部回复第 9 页 / 共 42 页
回复总数  837
1 ... 5  6  7  8  9  10  11  12  13  14 ... 42  
@maypok86

> I'd like some kind of answer to this, to be honest, because I've been told so much about how only memorycache can fight ristretto, but so far it's been disappointing.

MC is just an obscure library, and I'm sure hardly anyone would say that.
@maypok86 The heap is used to quickly remove expired elements. Redis seems to randomly check for expired elements, which is not as efficient as the heap. In fact, users don't care if a library strictly implements the LRU algorithm, all they want is a KV store with TTL.

I've updated the benchmarks. My local cachebench hit test was too much of a pain in the ass to run, so I gave up on it.

goos: linux
goarch: amd64
pkg: github.com/lxzan/memorycache/benchmark
cpu: AMD EPYC 7763 64-Core Processor
BenchmarkMemoryCache_Set-4 7657497 133.3 ns/op 27 B/op 0 allocs/op
BenchmarkMemoryCache_Get-4 23179834 58.10 ns/op 0 B/op 0 allocs/op
BenchmarkMemoryCache_SetAndGet-4 20667798 59.09 ns/op 0 B/op 0 allocs/op
BenchmarkRistretto_Set-4 7739505 321.4 ns/op 135 B/op 2 allocs/op
BenchmarkRistretto_Get-4 12482400 97.67 ns/op 18 B/op 1 allocs/op
BenchmarkRistretto_SetAndGet-4 7265832 140.4 ns/op 31 B/op 1 allocs/op
PASS
ok github.com/lxzan/memorycache/benchmark 31.137s
@maypok86 It's stupid to try and convince people tirelessly. I don't see a problem with using indexed priority queues to implement memory caching with TTL, MC works well in my company's projects. I also don't see a problem with benchmarking based on random strings, redis keys often contain data ids. In MC, if you only use GetWithTTL and SetWithTTL, it's just LRU.
@maypok86 The only competitor to MemoryCache (MC) is Ristretto, neither of which is GC optimized. GC optimization is not all positive gain, Codec overhead is not small. MC seeks to replace Redis in light-use scenarios, where indexed priority queues are the best data structure, simple and efficient.
@nullcache 是土播鼠就行了
193 天前
回复了 Sylarlong 创建的主题 分享创造 紫微斗数 | 这应该是个首创功能吧?
能算财运吗
193 天前
回复了 Nazz 创建的主题 Windows Windows10 已经成为了最好的 Linux 发行版
@hieroglyphs 不喜欢折腾的话很适合用 debian stable
193 天前
回复了 Nazz 创建的主题 Windows Windows10 已经成为了最好的 Linux 发行版
@jjx 我有个 13 代 intel 的笔记本,跑 windows11 还是挺卡的
194 天前
回复了 Nazz 创建的主题 Windows Windows10 已经成为了最好的 Linux 发行版
@hongchends1 Windows11 能用了吗? 文件管理和系统设置卡顿, 系统响应慢, 右键菜单折叠...
194 天前
回复了 Nazz 创建的主题 Windows Windows10 已经成为了最好的 Linux 发行版
@mephisto 少年精力旺盛. linux desktop 有点像黑苹果, 各种驱动问题.
194 天前
回复了 Nazz 创建的主题 Windows Windows10 已经成为了最好的 Linux 发行版
@Cooky 只有 11 糟糕, 7, 8, 8.1, 10 我用着都挺好
194 天前
回复了 Nazz 创建的主题 Windows Windows10 已经成为了最好的 Linux 发行版
@MrKrabs 苹果也不是正统 unix
194 天前
回复了 Nazz 创建的主题 Windows Windows10 已经成为了最好的 Linux 发行版
@llhhss jetbrains remote 很辣鸡, 直接打开文件夹体验还行. io 开销是可接受的, 保证日常使用流畅即可.
194 天前
回复了 Nazz 创建的主题 Windows Windows10 已经成为了最好的 Linux 发行版
@llhhss windows gui + linux shell
194 天前
回复了 Nazz 创建的主题 Windows Windows10 已经成为了最好的 Linux 发行版
@xsen 内存够用吗?
@CEBBCAT 我用 13.x 的时候一切正常,升到 14.0 各种问题。
194 天前
回复了 Nazz 创建的主题 Windows Windows10 已经成为了最好的 Linux 发行版
@lordofmetis 我这标题更引战
194 天前
回复了 Nazz 创建的主题 Windows Windows10 已经成为了最好的 Linux 发行版
@reeco desktop environment 真称不上好用。我前阵子折腾过 fedora 38 ,经常出现 WiFi 无法使用,而且手动创建的 icon 无法使用。迁移到最新版 Ubuntu 解决了这两个问题,但有没有开机就卡死了,终端显示效果也不如 windows terminal.
194 天前
回复了 Nazz 创建的主题 Windows Windows10 已经成为了最好的 Linux 发行版
@james122333 不要太较真
1 ... 5  6  7  8  9  10  11  12  13  14 ... 42  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2246 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 23ms · UTC 04:33 · PVG 12:33 · LAX 21:33 · JFK 00:33
Developed with CodeLauncher
♥ Do have faith in what you're doing.