タグ

関連タグで絞り込む (2)

タグの絞り込みを解除

algorithmとhashに関するpaellaのブックマーク (2)

  • 文字列のハッシュ値の計算 - imHo

    ハッシュの概念はわかる、けど実際のところどんなもんかよくわかってない…。特に文字列のハッシュ値をどうやって計算してるのかと、ハッシュ値が衝突したときにどうするのかと、バッファのサイズをどうするのか。なのでいくつかの処理系を調べてみた。 Gauche ソースを'hash'でgrepしたらそれらしい部分が見つかった。 /* General hash function */ u_long Scm_Hash(ScmObj obj) { u_long hashval; if (!SCM_PTRP(obj)) { SMALL_INT_HASH(hashval, (u_long)SCM_WORD(obj)); return hashval; } else if (SCM_NUMBERP(obj)) { return Scm_EqvHash(obj); } else if (SCM_STRINGP(obj

    文字列のハッシュ値の計算 - imHo
    paella
    paella 2011/04/27
    GaucheとLuaとRubyの文字列のハッシュ値を求めている箇所。ふむふむ
  • Hash Table Benchmarks

    I've put together a set of benchmarks of what I consider to be the most prominent C and C++ hash table implementations. I've made the code available at Github. If you have any critiques or corrections, please post a comment below, email me, or fork the code and send me a pull request on Github. While you can tweak some settings like growth factor, and supply different hash functions, I was more in

    paella
    paella 2010/03/31
    STLやBoostやPythonやRubyでのハッシュ実装を比較した記事。意外にBoostが遅いとかGoogle sparsehashすごいなとか、かなり面白い記事
  • 1