Merge branch 'dev'
This commit is contained in:
commit
f74d2dcea6
4 changed files with 26 additions and 9 deletions
13
CHANGELOG.md
13
CHANGELOG.md
|
|
@ -1,11 +1,22 @@
|
|||
> This project uses [Break Versioning](https://github.com/ptaoussanis/encore/blob/master/BREAK-VERSIONING.md) as of **Aug 16, 2014**.
|
||||
|
||||
## v2.9.0-RC2 / 2015 May 6
|
||||
|
||||
> This is a non-breaking **performance release**
|
||||
|
||||
* **Implementation**: switch `doseq` -> (faster) `run!` calls
|
||||
|
||||
```clojure
|
||||
[com.taoensso/nippy "2.9.0-RC2"]
|
||||
```
|
||||
|
||||
|
||||
## v2.9.0-RC1 / 2015 Apr 29
|
||||
|
||||
> This is a non-breaking **performance release** that can result in significant speed+space improvements for users serializing many small values
|
||||
|
||||
* **Implementation**: eliminate some unnecessary boxed math
|
||||
* **New**: intelligent allow auto-selection of `freeze` compression scheme using `:auto` compressor (now the default)
|
||||
* **New**: allow intelligent auto-selection of `freeze` compression scheme using `:auto` compressor (now the default)
|
||||
|
||||
|
||||
```clojure
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
```clojure
|
||||
[com.taoensso/nippy "2.8.0"] ; Stable
|
||||
[com.taoensso/nippy "2.9.0-RC1"] ; Dev, please see CHANGELOG for details
|
||||
[com.taoensso/nippy "2.9.0-RC2"] ; Dev, please see CHANGELOG for details
|
||||
```
|
||||
|
||||
# Nippy, a Clojure serialization library
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
(defproject com.taoensso/nippy "2.9.0-RC1"
|
||||
(defproject com.taoensso/nippy "2.9.0-RC2"
|
||||
:author "Peter Taoussanis <https://www.taoensso.com>"
|
||||
:description "Clojure serialization library"
|
||||
:url "https://github.com/ptaoussanis/nippy"
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
:dependencies
|
||||
[[org.clojure/clojure "1.4.0"]
|
||||
[org.clojure/tools.reader "0.9.2"]
|
||||
[com.taoensso/encore "1.24.1"]
|
||||
[com.taoensso/encore "1.28.0"]
|
||||
[org.iq80.snappy/snappy "0.3"]
|
||||
[org.tukaani/xz "1.5"]
|
||||
[net.jpountz.lz4/lz4 "1.3"]]
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
;;;; Encore version check
|
||||
|
||||
(let [min-encore-version 1.21]
|
||||
(let [min-encore-version 1.28] ; For `backport-run!` support
|
||||
(if-let [assert! (ns-resolve 'taoensso.encore 'assert-min-encore-version)]
|
||||
(assert! min-encore-version)
|
||||
(throw
|
||||
|
|
@ -209,7 +209,8 @@
|
|||
(println (format "DEBUG - freezer-coll: %s for %s" ~type (type ~'x)))))
|
||||
(if (counted? ~'x)
|
||||
(do (.writeInt ~'out (count ~'x))
|
||||
(doseq [i# ~'x] (freeze-to-out ~'out i#)))
|
||||
;; (doseq [i# ~'x] (freeze-to-out ~'out i#))
|
||||
(encore/backport-run! (fn [i#] (freeze-to-out ~'out i#)) ~'x))
|
||||
(let [bas# (ByteArrayOutputStream.)
|
||||
sout# (DataOutputStream. bas#)
|
||||
cnt# (reduce (fn [^long cnt# i#]
|
||||
|
|
@ -223,9 +224,14 @@
|
|||
(defmacro ^:private freezer-kvs [type id & body]
|
||||
`(freezer ~type ~id
|
||||
(.writeInt ~'out (* 2 (count ~'x)))
|
||||
(doseq [kv# ~'x]
|
||||
(freeze-to-out ~'out (key kv#))
|
||||
(freeze-to-out ~'out (val kv#)))))
|
||||
;; (doseq [kv# ~'x]
|
||||
;; (freeze-to-out ~'out (key kv#))
|
||||
;; (freeze-to-out ~'out (val kv#)))
|
||||
(encore/backport-run!
|
||||
(fn [kv#]
|
||||
(freeze-to-out ~'out (key kv#))
|
||||
(freeze-to-out ~'out (val kv#)))
|
||||
~'x)))
|
||||
|
||||
(freezer (Class/forName "[B") id-bytes (write-bytes out ^bytes x))
|
||||
(freezer nil id-nil)
|
||||
|
|
|
|||
Loading…
Reference in a new issue