Commit Graph

114 Commits (d38fe7a92c735f5770ac498fcf3cd617c8ec4ce5)

Author SHA1 Message Date
Doug Coleman e189954ecc core: Rename iota to <iota> so we can have TUPLE: iota ... ; instead of TUPLE: iota-tuple ... ; 2017-06-02 11:57:05 -05:00
John Benediktsson 8f6ac5d457 Revert "hash-sets,hashtables: make it so the array backing the hash is non-empty"
This reverts commit 6f10f06c27.
2016-10-06 11:18:41 -07:00
John Benediktsson db46b16d10 Revert "hash-sets,hashtables: improved key@ word"
This reverts commit 70c7f9e029.
2016-10-06 11:18:35 -07:00
Björn Lindqvist 6f10f06c27 hash-sets,hashtables: make it so the array backing the hash is non-empty
Commit 70c7f9e029 made it so the code
assumes the array is not empty. But it can be empty if the hashtable is
created using "hashtable new" and then it can crash because it reads
uninitialized memory. Setting the initial of the array slot to
a valid hash-array should fix that.
2016-10-05 19:19:39 +02:00
Björn Lindqvist 70c7f9e029 hash-sets,hashtables: improved key@ word
Don't need to check the length of the backing array because it can be
assumed to be > 0. That should make hash lookups a little faster.
2016-09-25 20:07:08 +02:00
Alexander Iljin 1aded9abdd docs: replace $description with $class-description for class words 2016-07-30 09:25:30 -07:00
Björn Lindqvist 91f335b424 style thing: indenting tuple slots 2016-05-31 03:37:23 +02:00
Doug Coleman c133c16377 core: Trim using lists from -tests and clean up a few irregularities. 2016-03-30 18:43:41 -07:00
Doug Coleman 92afdc3ad0 hashtables: rename ((tombstone)) to +tombstone+, ((empty)) to +empty+ 2016-03-25 03:13:27 -07:00
John Benediktsson b75def3bfb hashtables: remove 2hashtable (not really used). 2016-03-03 14:38:16 -08:00
Doug Coleman 3c48141689 hashtables: add a 2hashtable word that is like associate but for two key/value pairs. 2016-03-02 17:17:58 -08:00
John Benediktsson ceb75057da change ERROR: words from throw-foo back to foo. 2015-08-13 16:13:05 -07:00
Doug Coleman 02008979d9 factor: Change ERROR: foo ; to define ``throw-foo`` instead of having ``foo`` throw implicitly. The old ``foo`` still throws implicitly because this is a big change to get right in one patch, but it should be removed soon. 2015-08-12 15:26:18 -05:00
Doug Coleman a66cf55e8e hashtables: Don't test word's hashcode as a bignum after all. It's not allowed. 2015-07-18 09:17:34 -07:00
Doug Coleman bc0c02acdf core: declare word's hashcode an integer. Make word not flushable since it's mutable. Add a test case for #1392.
Fixes #1392. @bjourne found this.
2015-07-18 00:27:12 -07:00
John Benediktsson d6d69952e5 hashtables: fix docs differently. 2015-07-14 21:51:02 -07:00
John Benediktsson 41629dce2f Fix some things broken by hashtable capacity changes. 2015-07-14 21:45:39 -07:00
John Benediktsson 6127bb8548 hashtables: make sure capacity and growth use same load factor. 2015-07-14 18:32:40 -07:00
Doug Coleman 43d6f1d3e2 factor: Retrying on the unit tests. Also normalize some syntax with FUNCTION:. 2015-07-02 17:28:17 -07:00
Doug Coleman 59f3b1ea57 Revert "factor: rename [ ] [ ] unit-test -> { } [ ] unit-test using a refactoring tool!"
Needs a bit more work.

This reverts commit 7e54cc2824.
2015-07-02 13:47:06 -07:00
Doug Coleman 7e54cc2824 factor: rename [ ] [ ] unit-test -> { } [ ] unit-test using a refactoring tool! 2015-07-02 11:36:08 -07:00
John Benediktsson 5083bdad33 Revert "hashtables: make hash-combine use fixnum primitives."
This reverts commit 390dd23261.
2015-06-11 20:33:47 -07:00
John Benediktsson 95c34c41b7 hashtables: remove the 2hashcode word for now. 2015-06-09 16:46:02 -07:00
John Benediktsson 390dd23261 hashtables: make hash-combine use fixnum primitives. 2015-06-09 16:30:04 -07:00
John Benediktsson 6210edf76e words: change word hash to do less work. 2015-06-09 16:08:48 -07:00
John Benediktsson b366a06c41 use reject instead of [ ... not ] filter. 2015-05-12 18:50:34 -07:00
Doug Coleman 632ee276e1 core: Remove trailing whitespace. 2014-10-31 01:14:31 -07:00
John Benediktsson 57f9d78892 improve help by linking to types directly. 2014-05-23 20:20:15 -07:00
John Benediktsson fb9c5f9aee hashtables: slightly faster associate and collect-pairs. 2014-02-06 22:39:43 -08:00
John Benediktsson 6b0e72a475 hashtables: simplify <hashtable>. 2014-01-08 09:56:00 -08:00
John Benediktsson 260abd3d7c hashtables: use >= in hash-large?. 2014-01-05 23:08:53 -08:00
John Benediktsson e3ea3ac140 hashtables: cleanup duplicate code. 2013-04-06 21:36:39 -07:00
John Benediktsson a58c8ecc03 hashtables: faster keys and values on hashtables. 2013-04-06 21:20:07 -07:00
John Benediktsson 5d11ada701 hashtables: remove stack effects from generic methods. 2013-03-23 16:58:30 -07:00
Doug Coleman 8c19602ae9 assocs: Add of and ?of. Change all the things at once! Fixes #701. 2013-03-23 14:59:07 -07:00
John Benediktsson 11e86ec53c hashtables: faster grow-hash by not calling >alist. 2013-03-20 23:02:40 -07:00
John Benediktsson eca5253017 hashtables: reuse (rehash). 2013-03-07 22:01:50 -08:00
John Benediktsson f2eedb67ec hashtables: slightly faster grow logic. 2013-03-07 20:51:46 -08:00
John Benediktsson 5487480126 core: cleanup USING lists. 2013-03-05 10:34:47 -08:00
John Benediktsson 247600df71 hashtables: use "4drop" instead of "drop 3drop". 2012-10-23 12:26:14 -07:00
John Benediktsson 28f36a25b0 Revert "core: >array, >byte-vector, >hashtable, >vector should be inline."
This reverts commit cd6026e70e.
2012-10-05 08:30:41 -07:00
John Benediktsson 700cee5afd core: >array, >byte-vector, >hashtable, >vector should be inline. 2012-09-28 19:31:14 -07:00
Doug Coleman 8637c1c012 hashtables: Enforce shape on hashtable literals. Fixes #568. 2012-08-24 15:11:03 -07:00
John Benediktsson 4a56b0c178 hashtables: testing that associate and H{ } set-at have same characteristics. 2012-08-03 08:30:55 -07:00
John Benediktsson 8b2ae0a717 hashtables: reduce default size of associate. 2012-08-02 21:43:37 -07:00
Doug Coleman b656c8ef9e hashtables: Revert size of associate, but keep inlined. ~10s speedup on bootstrap 2012-07-20 09:30:37 -07:00
John Benediktsson 00056e2ea7 hashtables: use H{ } clone in associate, make it inline. 2012-07-20 09:04:51 -07:00
Joe Groff 943596575a use radix literals 2011-11-23 19:03:40 -08:00
Slava Pestov 29bc075bc7 hashtables: small cleanup 2011-11-12 15:35:51 -08:00
John Benediktsson 7b28e60e0e hashtables: fix docs for new-key@, and note that quadratic probing is used now. 2011-11-10 16:20:59 -08:00