Commit graph

92 commits

Author SHA1 Message Date
Charles Blake
d129e8f6c6 Update doc comments to mention rightSize. 2015-02-13 08:28:58 -05:00
Araq
10335fd726 fixed minor bugs; cleaned up tests 2015-02-12 14:56:56 +01:00
Charles Blake
49d88cee68 Oops - missed updates to a few later rawGet()s. 2015-02-12 06:44:09 -05:00
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
Araq
dbe71c715e documented new C++ support 2015-01-28 12:59:04 +01:00
Guillaume Gelin
3119fe087d Happy new year! 2015-01-06 15:26:33 +01:00
Araq
2990a9224b better CSS; better docs for teh tables module 2014-12-21 15:59:01 +01:00
Araq
27869b6c7b big rename 2014-08-28 00:36:14 +02:00
Araq
df172806ea big rename 2014-08-28 00:24:52 +02:00
Araq
11b6958755 big rename 2014-08-27 23:42:51 +02:00
Araq
2f43fdb837 renamefest 2014-08-23 01:43:49 +02:00
Clay Sweetser
18003ff196 Added stylistic consistancy. 2014-07-24 18:17:20 -04:00
Felix Krause
f59ca2736d Fixed == for PTables, added test. 2014-06-27 16:57:01 +02:00
Andreas Rumpf
d927eb5854 Merge pull request #1251 from gradha/pr_misc_docs
Misc docs suggestions
2014-06-12 16:39:20 +02:00
Araq
9354b8a9d7 added allValues iterator 2014-06-12 14:45:56 +02:00
Grzegorz Adam Hankiewicz
af6abac491 Revert "Adds to tables module example of reference type vs value type."
This reverts commit bde9d1ac07.
2014-06-10 00:39:19 +02:00
Grzegorz Adam Hankiewicz
bde9d1ac07 Adds to tables module example of reference type vs value type. 2014-06-06 20:18:19 +02:00
Grzegorz Adam Hankiewicz
9009841d62 Avoids temporal string in tables hashing example. 2014-06-06 19:53:39 +02:00
Reimer Behrends
79891b6b9b Added support for ref type hash tables.
This reuses the hash table implementation for objects (and the
associated tests). For efficiency reasons, iterator implementations
are currently adapted rather than calling the TTable code.
2014-05-04 15:22:50 +02:00
Grzegorz Adam Hankiewicz
15bd91a5da Adds example of custom object types used as table key. 2014-04-22 09:37:24 +02:00
Dominik Picheta
00dc93b65b Fixes collections/ttables. 2014-04-18 21:50:51 +01:00
Andreas Rumpf
3ee25170c3 fixes '==' for TTTable 2014-04-13 00:22:07 +02:00
Andreas Rumpf
587f0bd086 fixes '==' for TTTable 2014-04-13 00:20:25 +02:00
Simon Hafner
5498415f3b indexBy, which indexes a collection into a hashtable 2014-02-06 16:11:55 -06:00
Araq
fc452787e7 better html generator for the tester; fixes some VM bugs 2014-01-17 01:18:57 +01:00
Araq
92b8fac94a case consistency part 4 2013-12-27 23:10:36 +01:00
Araq
2df9b442c6 case consistency part 1 2013-12-27 15:48:53 +01:00
Grzegorz Adam Hankiewicz
1bd12e208b Mentions nextPowerOfTwo proc for table initialization. 2013-03-17 12:19:40 +01:00
Grzegorz Adam Hankiewicz
72a3e21f28 Removes executable bit for text files. 2013-03-16 23:53:07 +01:00
Araq
b3e70febb4 'sort' for ordered tables 2013-01-12 23:59:29 +01:00
Araq
4670445a93 'importcpp' for the JS target to generate an infix call 2013-01-11 01:08:37 +01:00
Araq
3af5c99336 fixes #293 2013-01-08 20:03:02 +01:00
Araq
a59abdf8e4 made more tests green; fixes #201 2012-09-12 21:48:37 +02:00
Araq
f893179889 documented hygienic templates; made tests green; fixed system.clamp 2012-08-22 22:46:02 +02:00
Araq
4f1b89c30c year 2012 for most copyright headers 2012-01-02 23:07:35 +01:00
Araq
62aa8bed3b tester: threading tests added 2011-11-19 02:05:16 +01:00
Araq
7000cf51b7 modifyable results for generics; teventemitter works 2011-08-09 01:40:12 +02:00
Araq
5b96eaa953 preparations for 0.8.12 2011-07-10 15:48:13 +02:00
Araq
ec2bd53ead implemented tables.add 2011-06-11 17:03:45 +02:00
Araq
5f2d930a54 Bugfix: no #line dir with 0 generated 2011-06-10 02:22:16 +02:00
Araq
3bc821aa5c basic generic collections implemented and tested 2011-06-07 03:37:36 +02:00
Araq
42eb21be7b bugfix: generic instantiation across module boundaries 2011-06-06 08:45:11 +02:00
Renamed from lib/pure/collections/hashtables.nim (Browse further)