Skip to content

Commit

Permalink
doc stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
dlesbre committed May 11, 2024
1 parent d1c5b45 commit b92ee75
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ module MakeSet(Key: KEY) : SET with type elt = Key.t
module MakeHeterogeneousSet(Key: HETEROGENEOUS_KEY) : HETEROGENEOUS_SET
with type 'a elt = 'a Key.t
module MakeHeterogeneousMap(Key: HETEROGENEOUS_KEY)(Value: HETEROGENEOUS_VALUE) : HETEROGENEOUS_MAP
module MakeHeterogeneousMap(Key: HETEROGENEOUS_KEY)(Value: HETEROGENEOUS_VALUE) :
HETEROGENEOUS_MAP
with type 'a key = 'a Key.t
and type ('k,'m) value = ('k,'m) Value.t
```
Expand All @@ -125,8 +126,8 @@ of these four functors: `MakeHashconsedMap`, `MakeHashconsedSet`,
These uniquely number their nodes, and ensure nodes with the same contents are
always physically equal. With this unique numbering:
- `equal` and `compare` become constant time operations;
- two maps with the same bindings (where keys compared by `KEY.to_int` and
values by `HASHED_VALUE.polyeq` will always be physically equal;
- two maps with the same bindings (where keys are compared by `KEY.to_int` and
values by `HASHED_VALUE.polyeq`) will always be physically equal;
- functions that benefit from sharing will see improved performance;
- constructors are slightly slower, as they now require a hash-table lookup;
- memory usage is increased: nodes store their tags inside themselves, and
Expand Down
5 changes: 3 additions & 2 deletions index.mld
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ The functors used to build maps and sets are the following:
{li For Heterogeneous (generic) maps and sets: {{!PatriciaTree.MakeHeterogeneousMap}[MakeHeterogeneousMap]}
and {{!PatriciaTree.MakeHeterogeneousSet}[MakeHeterogeneousSet]}.
{[
module MakeHeterogeneousMap(Key: HETEROGENEOUS_KEY)(Value: HETEROGENEOUS_VALUE) : HETEROGENEOUS_MAP
module MakeHeterogeneousMap(Key: HETEROGENEOUS_KEY)(Value: HETEROGENEOUS_VALUE) :
HETEROGENEOUS_MAP
with type 'a key = 'a Key.t
and type ('k,'m) value = ('k,'m) Value.t
module MakeHeterogeneousSet(Key: HETEROGENEOUS_KEY) : HETEROGENEOUS_SET
Expand All @@ -117,7 +118,7 @@ The functors used to build maps and sets are the following:
These uniquely number their nodes, and ensures {b nodes with the same contents are
always physically equal}. With this unique numbering:
- [equal] and [compare] become constant time operations;
- two maps with the same bindings (where keys compared by {{!PatriciaTree.KEY.to_int}[KEY.to_int]} and
- two maps with the same bindings (where keys are compared by {{!PatriciaTree.KEY.to_int}[KEY.to_int]} and
values by {{!PatriciaTree.HASHED_VALUE.polyeq}[HASHED_VALUE.polyeq]}) will always be physically equal;
- functions that benefit from sharing will see improved performance;
- constructors are slightly slower, as they now require a hash-table lookup;
Expand Down

0 comments on commit b92ee75

Please sign in to comment.