Yiling-J

Results 44 comments of Yiling-J

hi @ben-manes I'm optimizing the sketch and have a question. The block mask is (table.length >>> 3) - 1 and you choose a block based on blockHash: block = (blockHash...

@ben-manes I don't enable doorkeeper in my hit ratio benchmarks. I think the old design in caffeine is "counters are uniformly distributed", which means picking 4 counters randomly in table,...

@ben-manes thanks, I will take a look

@ben-manes @vmg Excited! I will take a look the hash flooding attacks problem and the vitess PR this week.

@aktau Thank you for sharing the information! I think we can take a look this discussion by ben, author of Caffeine/TinyLFU: https://github.com/1a1a11a/libCacheSim/discussions/20

@maypok86 one thing i'm interested: did you compare the performance of xsync map and sharded map(throughput and gc)? from xsync author there is some overhead(https://github.com/puzpuzpuz/xsync/issues/102)? If xsync map always outperforms,...

@zhenzou as @maypok86 pointed out, this is not related to validator. This is because current hash function of Theine calculate hash based on object's memory bytes. String is pointer to...

@zhenzou I do a quick fix on master branch so you are not blocked. I still need some investigations before release a new version. About your validator question, I think...

@zhenzou Actually there might be the case your key struct already has a StringKey method and do something else. So what i think is adding an extra method to builder,...

@zhenzou main branch updated, please use the new builder method: ```go builder := theine.NewBuilder[Foo, int](10000) builder.StringKey(func(k Foo) string { return k.Bar }) ```