mgsloan / store

Fast binary serialization in Haskell
MIT License
109 stars 35 forks source link

Fix and tests for mutable vector and hashmap #109

Closed chrisdone closed 7 years ago

chrisdone commented 7 years ago

@mgsloan Re our last PR #108 the following are implemented:

  1. The approach you suggested for vectors to only allocate vector of n elements if at least n bytes are available as input.
  2. On here I put a maxNullaryVectorSize at 4096 (arbitrary). We could perhaps put this as a compile-time flag. Any thoughts?
  3. Added a check so that when consuming maps, it checks that the input list is ordered by key, rejects it otherwise.

There're tests for each of these.

chrisdone commented 7 years ago

@mgsloan Build passes, ready for merge!