mirror of
https://github.com/janet-lang/janet
synced 2025-11-12 05:23:02 +00:00
Update code.
This commit is contained in:
@@ -61,11 +61,10 @@ const DstKV *dst_struct_find(const DstKV *st, Dst key) {
|
||||
* Nil keys and values are ignored, extra keys are ignore, and duplicate keys are
|
||||
* ignored.
|
||||
*
|
||||
* Much of this complexity is in the robinhood hashing scheme, an
|
||||
* attempt to make structs that are created with arguments in a different
|
||||
* order to have the same internal representation. If this turns out to be
|
||||
* incorrect or too complicated, another scheme that would definitely work
|
||||
* is inserting all keys in sorted order with any deterministic hashing scheme. */
|
||||
* Runs will be in sorted order, as the collisions resolver essentially
|
||||
* preforms an in-place insertion sort. This ensures the internal structure of the
|
||||
* hash map is independant of insertion order.
|
||||
*/
|
||||
void dst_struct_put(DstKV *st, Dst key, Dst value) {
|
||||
int32_t cap = dst_struct_capacity(st);
|
||||
int32_t hash = dst_hash(key);
|
||||
|
||||
Reference in New Issue
Block a user