Nim/lib
Charles Blake 5fbcf93860 Add hcode,rightSize,rawGetKnownHC. Fix inf loop.
Make similar changes to those made in sets.nim, including hcode, rightSize
rawGet/rawGetKnownHC result protocol, nextTry probe sequence to be the cache
friendlier h=h+1 which in turn allows supporting changing deletion to fix the
infinite loop bug with local rehashing which in turn has desirable properties
of graceful table aging when deletes do happen and also making insert-only
usage patterns no longer pay any time/space cost to check deleted status.

Unlike collections.sets, this module has add() for duplicate key inserts and
a 3rd type of table, CountTable.  The first wrinkle is handled by introducing
a rawGetDeep for unconditionally adding entries along collision chains.  This
point of CountTable seems to be space efficiency at 2 items per slot.  These
changes retain that by keeping the val==0 => EMPTY rule and not caching hash
codes.  putImpl is expanded in-place for CountTable since the new putImpl() is
too different. { Depending on table size relative to caches & key expense,
regular Table[A,B] may become faster than CountTable, especially if the basic
count update could be something like inc(mGetOrPut(t, key, 0)). }

Unit tests pass, but in this module those are much more of just a demo than
probing for bugs.  Should exercise/test this a little more before merging.
2015-02-12 05:22:04 -05:00
..
core Update macros.nim 2015-02-02 17:57:31 +00:00
impure Corrected warnings about deprecated names 2015-02-11 21:38:55 +01:00
js docgen should work again 2014-10-05 03:06:19 +02:00
packages/docutils Replace other common expressions with defined variable 2015-01-12 11:20:26 -08:00
posix Rename termios template CCEQ to cceq 2015-02-04 19:18:09 +01:00
pure Add hcode,rightSize,rawGetKnownHC. Fix inf loop. 2015-02-12 05:22:04 -05:00
system Merge pull request #2053 from reactormonk/message-for-koch-temp 2015-02-12 09:40:31 +01:00
windows Fix cross to windows compilation on linux 2014-12-30 15:42:18 -05:00
wrappers Fixing dylib name for OSX 2015-02-11 21:38:55 +01:00
cycle.h Removes executable bit for text files. 2013-03-16 23:53:07 +01:00
nimbase.h merged #2083 manually 2015-02-08 13:38:04 +01:00
nimrtl.nim Nimrod renamed to Nim 2014-08-28 09:50:51 +02:00
nimrtl.nim.cfg Rename *.nimrod.cfg to *.nim.cfg 2015-02-03 09:04:24 +01:00
prelude.nim Nimrod renamed to Nim 2014-08-28 09:59:26 +02:00
stdlib.nimble VM supports math and a few os procs 2014-08-30 16:37:27 +02:00
system.nim fixes #2073 2015-02-08 14:15:02 +01:00