packages feed

rocksdb-haskell-jprupp 2.6.3 → 2.6.4

raw patch · 4 files changed

+25/−7 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,3 +1,13 @@+## 2.6.4++ * Iterators read rows about three times faster. `iterValid`, `iterKey` and+   `iterValue` now reach RocksDB through unsafe foreign calls. The three only+   read what the iterator already holds, and reading one row with `iterEntry`+   and `iterNext` makes five of them; as safe calls each cost about 0.4+   microseconds. Walking 700,000 rows took 2.8 microseconds a row before and+   0.8 after. The calls that move an iterator, which can read from disk, are+   safe calls as before.+ ## 2.6.3   * Documentation only; the library behaves as in 2.6.2.
README.md view
@@ -184,7 +184,7 @@  ```yaml extra-deps:-  - rocksdb-haskell-jprupp-2.6.3+  - rocksdb-haskell-jprupp-2.6.4 ```  With `stack --nix`, add RocksDB to the Nix packages:
rocksdb-haskell-jprupp.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack  name:           rocksdb-haskell-jprupp-version:        2.6.3+version:        2.6.4 synopsis:       Haskell bindings for RocksDB description:    See README at <https://github.com/jprupp/rocksdb-haskell#readme> category:       Database, FFI
src/Database/RocksDB/C.hs view
@@ -392,7 +392,15 @@   c_rocksdb_iter_destroy :: Iterator -> IO ()  -- | Binding to @rocksdb_iter_valid@.-foreign import ccall safe "rocksdb/c.h rocksdb_iter_valid"+--+-- An unsafe call, like 'c_rocksdb_iter_key' and 'c_rocksdb_iter_value': the+-- three only read what the iterator already holds, and return at once. A+-- safe call lets other Haskell threads run meanwhile, which costs about 0.4+-- microseconds each time, and reading one row takes five of these calls.+-- Walking 700,000 rows took 2.8 microseconds a row with safe calls and 0.8+-- with unsafe ones. The calls that move the iterator stay safe, because+-- they can read from disk.+foreign import ccall unsafe "rocksdb/c.h rocksdb_iter_valid"   c_rocksdb_iter_valid :: Iterator -> IO CUChar  -- | Binding to @rocksdb_iter_seek_to_first@.@@ -415,12 +423,12 @@ foreign import ccall safe "rocksdb/c.h rocksdb_iter_prev"   c_rocksdb_iter_prev :: Iterator -> IO () --- | Binding to @rocksdb_iter_key@.-foreign import ccall safe "rocksdb/c.h rocksdb_iter_key"+-- | Binding to @rocksdb_iter_key@. Unsafe; see 'c_rocksdb_iter_valid'.+foreign import ccall unsafe "rocksdb/c.h rocksdb_iter_key"   c_rocksdb_iter_key :: Iterator -> Ptr CSize -> IO Key --- | Binding to @rocksdb_iter_value@.-foreign import ccall safe "rocksdb/c.h rocksdb_iter_value"+-- | Binding to @rocksdb_iter_value@. Unsafe; see 'c_rocksdb_iter_valid'.+foreign import ccall unsafe "rocksdb/c.h rocksdb_iter_value"   c_rocksdb_iter_value :: Iterator -> Ptr CSize -> IO Val  -- | Binding to @rocksdb_iter_get_error@.