Open johannesgerer opened 4 years ago
That's a bit hard to answer as is. What kind of serialization use case do you have in mind?
For example a Haskell REST Api serving Haskell data structures to a GHCJS powered client.
I settled for persist after consulting this benchmark, and excluding platform-dependent encoding and flat which could not be compiled on reflex-platform's GHCJS out-of-the-box.
I also tested browsers JSON.parse
followed by fromJSVal_aeson, but only saw 2x speedup and ended up preferring the non-FFI solution.
I see significant 10x speedups in my usecase where GHCJS-compiled JS requests Haskell Values generated on and to be serialized by a Haskell server and de-serializes it back into Haskell values.
Deserialization time went from 4s using Aeson (4MB serialized JSON) down to 0.4s when using Persist (3MB serialized).
Wonderful data! Thanks!
To clarify, you found that persist
was fastest but persist uses a binary format. You mention that your usecase uses JSON. I don't understand how persist helps here.
You are right, see my updated response
Could reflex-platform devs/users share their experiences with different serialization libraries?
Is there a clear winner?
Thanks