Add "indexmap" feature for deterministic order #11

Merged
kaspar030 merged 1 commit from add_indexmap_feature into master 2021-11-27 08:42:59 +13:00
kaspar030 commented 2021-11-26 10:52:30 +13:00 (Migrated from github.com)

This PR allows to optionally use IndexMap and IndexSet from indexmap for order-preserving drop-in replacements for HashMap and HashSet.

If I understand the used algorithm correctly, this makes the output of solvent deterministic. (it does for the example. 😇).

As indexmap would add an dependency, and might be a tad slower in benchmarks, this is guarded by the non-default feature "deterministic".

This PR allows to optionally use IndexMap and IndexSet from [indexmap](https://docs.rs/indexmap/1.7.0/indexmap/) for order-preserving drop-in replacements for HashMap and HashSet. If I understand the used algorithm correctly, this makes the output of solvent deterministic. (it does for the example. :innocent:). As indexmap would add an dependency, and might be a tad slower in benchmarks, this is guarded by the non-default feature "deterministic".
mikedilger commented 2021-11-27 08:43:08 +13:00 (Migrated from github.com)

Thanks!

Thanks!
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mikedilger/solvent!11
No description provided.