[#61424] [REJECT?] xmalloc/xfree: reduce atomic ops w/ thread-locals — Eric Wong <normalperson@...>

I'm unsure about this. I _hate_ the extra branches this adds;

13 messages 2014/03/12

[ruby-core:61632] Re: hash function for global method cache

From: Eric Wong <normalperson@...>
Date: 2014-03-22 03:20:24 UTC
List: ruby-core #61632
Юрий Соколов <funny.falcon@gmail.com> wrote:
> what's the profit from using binary tree in place of hash?

Mainly: not caring about the quality of hash function :)

Also: no extra allocation/resizing for buckets (but existing allocations
get 1 pointer bigger than my ihash implementation).  Splay tree has
self-optimizing behavior may also be good for us (but hurts CoW).


Fwiw, I also played with critbit trees (with container_of), but could
not figure out how to do non-recursive traversal nor conditional
unlink/delete while traversing :<

In This Thread