simd-json icon indicating copy to clipboard operation
simd-json copied to clipboard

Questions about implementation and experience?

Open Ygg01 opened this issue 1 year ago • 0 comments

Let me preface this as this project is awesome and I quite enjoyed reading through code. I'm reading cause I'm intrested in SIMD-ifying my YAML parsing crate.

But I got few questions about the implementation details, or link me to some alternate discussion board.

Here are the questions:

  1. Why are structural indexes: https://github.com/simd-lite/simd-json/blob/b249c70d3255e028ee0b2a6d2ee70b886f910558/src/lib.rs#L779-L781 Vec<u32> and not Vec<u64>?

    1. This means largest JSON parsed (assuming UTF-8 encoding) is 4GB, right?
    2. Is it for performance reasons or something else I might have missed?
  2. Does using macros like this one: https://github.com/simd-lite/simd-json/blob/b249c70d3255e028ee0b2a6d2ee70b886f910558/src/stage2.rs#L128-L144

    Offer benefits over using an #[inline] on function?

  3. In Readme.md you mentioned something about a We work around some performance bottlenecks imposed by safe rust Does this means the indexing penalty you pay for safe array access?

Ygg01 avatar Jan 29 '24 21:01 Ygg01