Commit graph

14 commits

Author SHA1 Message Date
Peter Taoussanis
9db09e16a9 [new] [#163] Track serialized output in tests 2024-02-06 14:30:59 +01:00
Peter Taoussanis
c2770c6e99 [mod] Refactor stress data
BREAKING for the very small minority of folks that use `nippy/stress-data`.

Changes:

1. Make `nippy/stress-data` a function

   It's unnecessarily wasteful to generate and store all this data when it's not
   being used in the common case.

2. Make data deterministic

   The stress data will now generally be stable by default between different versions
   of Nippy, etc. This will help support an upcoming test for stable serialized output.
2024-02-06 14:30:59 +01:00
Peter Taoussanis
27b3ed958b [nop] Misc housekeeping 2024-02-06 14:30:59 +01:00
Peter Taoussanis
fb6f75e4d7 [new] Smarter, faster, protocol-based freezable? util 2023-10-11 14:23:34 +02:00
Peter Taoussanis
bcf767332e [nop] Move benchmarks ns under tests dir
Prevents benchmark code from being unnecessarily included as dependency
2023-10-11 14:23:34 +02:00
Peter Taoussanis
6ad5aebd1a [new] Add :zstd compressor, new compressor backend
Also switch to https://github.com/airlift/aircompressor for faster
and combined implementations of: LZ4, Snappy
2023-10-11 14:23:34 +02:00
Peter Taoussanis
8d76d9c350 [nop] Improve generative tests, etc.
Incl.:

  - Enlarge set of generated data types
  - Use generative tests in more cases
  - Run more test rounds
2023-09-25 11:50:06 +02:00
Peter Taoussanis
8b7186a930 [nop] Update benchmark results 2023-08-02 13:50:40 +02:00
Peter Taoussanis
89f98b440f [new] [#153] PoC: transducer support on thaw
Note: also considered (but ultimately rejected) idea of a separate
`*thaw-mapfn*` opt that operates directly on every `thaw-from-in!`
result.

This (transducer) approach is more flexible, and covers the most
common use cases just fine. Having both seems excessive.
2023-08-02 13:50:40 +02:00
Peter Taoussanis
0a9d67084b [new] [Storage efficiency] PoC: separate signed long types
Before:
  Longs in [  -128,   127] use 1 byte
  Longs in [-32768, 32767] use 2 bytes
  etc.

After:
  Longs in [  -255,   255] use 1 byte
  Longs in [-65535, 65535] use 2 bytes
  etc.

I.e. doubles the range of longs that can be stored by 1, 2, and 4 bytes.

This changes saves:
  - 1 byte  per long in [  128,   255], or [  -129,   -255]
  - 2 bytes per long in [32768, 65535], or [-32769, -65535]
  - 4 bytes per long ...

Is this advantage worth the extra complexity? Probably yes, given how
common longs (and colls of longs) are in Clojure.
2023-08-02 13:50:40 +02:00
Peter Taoussanis
fa1cc66bf3 [fix] [#143] Don't freeze meta info for types that don't support with-meta 2023-08-02 13:50:40 +02:00
Peter Taoussanis
8e363dbcf9 [#154] Revert "[mod] [DEPRECATED] Remove ability to freeze new data using experimental cache feature"
This reverts commit f1af0cae674f7dea29d460c5b630a58c59c7dcab.

Motivation for revert:

  At least 1 user has reported depending on the current `cache`
  feature, and implementing it manually (i.e. outside of Nippy) can
  be non-trivial.

  Rather than risk breaking folks, I'll take some more time to
  consider alternatives. There's no urgency on this.
2023-08-02 13:43:59 +02:00
Peter Taoussanis
648d5c0232 [mod] [DEPRECATED] Remove ability to freeze new data using experimental cache feature
This commit is BREAKING for those still actively using `nippy/cache`.

Data previously frozen using `nippy/cache` can still be thawed, though
support for thawing may also be removed in a future Nippy version.

Motivation for removal:

  This cache feature (marked as experimental) was always a bit dubious.
  The use cases were very limited, and the complexity quite significant.

  I don't believe that the feature has ever had much (any?) public
  adoption, so I'm removing it here.

  PLEASE LET ME KNOW if this removal negatively impacts you.
2023-08-02 13:43:59 +02:00
Peter Taoussanis
064015e874 [nop] Update tests 2023-07-31 16:42:10 +02:00