[ruby-core:60394] Re: [ruby-trunk - Feature #9425] [Open] [PATCH] st: use power-of-two sizes to avoid slow modulo ops

From: Eric Wong <normalperson@...>
Date: 2014-02-01 07:51:08 UTC
List: ruby-core #60394
Notes to self (or anybody else with free time right now):
  test and verify compare_by_identity performance

I'm comfortable that ID, string and most objects will hash well with
power-of-two; but compare_by_identity, weakmap, vm->living_threads may
hash less well without a prime modulo (or maybe they hash badly
regardless of modulo!)

I'm also interested in using a doubly-linked list (ccan/list[1])
for vm->living_threads (and possibly other places).

[1] BSDL version of the Linux kernel list.h at http://ccodearchive.net/

In This Thread

Prev Next