You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am exploring adopting simd-json for parsing GeoJSON files in the geojson library. However, I'm having trouble understanding how this library is meant to be used. I thought it would be a drop-in replacement for serde (given that it falls back to serde for parsing when SIMD instructions aren't available). But when I just replace use serde::{etc} with use simd_json::{etc}, it turns out that simd_json doesn't export Deserialize, Serialize or Serializer. So clearly there's more to it.
The examples directory has just a single file in it, which is actually a benchmarking exercise. It's not clear from that code how to convert a serde_json implementation to one using simd-json.
The one glimmer of explanation I have found is in the Serde Compatible API section of the docs, but it has a warning saying that it's untested!
So I'm hoping I can get a pointer to some documentation or example code for how to acutally use this library to speed up an existing serde_json implemtation. Thanks in advance.
The text was updated successfully, but these errors were encountered:
that's a bit misleading wording in the hint from docs.rs, it doesn't mean it's an untreated feature but that we do not run that example during normal unit tests you can use the serde interface it's well tested and stable.
It's also worth looking at https://github.com/simd-lite/simd-json-derive ; it only supports a subset from serde derives features but directly integrates with simd-json and is often significantly faster
I am exploring adopting simd-json for parsing GeoJSON files in the geojson library. However, I'm having trouble understanding how this library is meant to be used. I thought it would be a drop-in replacement for serde (given that it falls back to serde for parsing when SIMD instructions aren't available). But when I just replace
use serde::{etc}
withuse simd_json::{etc}
, it turns out thatsimd_json
doesn't exportDeserialize
,Serialize
orSerializer
. So clearly there's more to it.The
examples
directory has just a single file in it, which is actually a benchmarking exercise. It's not clear from that code how to convert a serde_json implementation to one using simd-json.The one glimmer of explanation I have found is in the Serde Compatible API section of the docs, but it has a warning saying that it's untested!
So I'm hoping I can get a pointer to some documentation or example code for how to acutally use this library to speed up an existing serde_json implemtation. Thanks in advance.
The text was updated successfully, but these errors were encountered: