Realized about a 10x speedup.
- add benches/million-updates.rs
- optimization: use rand instead of nanorand (because of thread_rng() initialization being muchf aster)
- update README
Signed-off-by: Stephen Waits <steve@waits.net>
Goal: To make the serialization format more sensible instead of it being a reflection of our internal (ie private) data model.
- mostly handled with #[serde()] macros (renaming, flattening)
- renamed NetworkCoordinate::position to heightvec which is a better name, even if not seen in the published interface
- changed HeightVector from a tuple struct to a named struct so we can control serde on a field-by-field basis
- updated README, tests, and doc tests to match
Signed-off-by: Stephen Waits <steve@waits.net>
Adds serialization/deserialization support via serde and serde_with.
Also:
- remove `license-file` in Cargo.toml (superfluous)
- update README with Getting Started section
- add `serde` and `serde_with` dependencies to README
- add tests to `HeightVector`
- tweak assertion in `NetworkCoordinate`
- refactor `Vector` to be a struct witn an `inner` instead of a tuple struct so that we can use `serde_as` (from `serde_with`) to help us derive SerDe implementations for the const generic sized array
- moved trait requirements (which are getting long) into where clauses
Signed-off-by: Stephen Waits <steve@waits.net>