simdjson-go icon indicating copy to clipboard operation
simdjson-go copied to clipboard

Please support arm64

Open lizthegrey opened this issue 2 years ago • 7 comments

Hi! We'd love to use this library, but we're currently all in on arm64. Is there a chance you'll do an arm64 version of this port?

lizthegrey avatar Dec 01 '21 17:12 lizthegrey

Hi! We'd love to use this library, but we're currently all in on arm64. Is there a chance you'll do an arm64 version of this port?

That is a significant effort @lizthegrey - we are open to pull requests.

harshavardhana avatar Dec 01 '21 17:12 harshavardhana

Ah, I see, it's not a mechanical translation, it's a hand port? Will take that under consideration. Thanks!

lizthegrey avatar Dec 01 '21 18:12 lizthegrey

There is arm64 support in the original simdjson project -- so it is definitely possible to port this over, but it will be a significant effort.

fwessels avatar Dec 01 '21 18:12 fwessels

A more manageable (and possibly also more useful) would be Go fallback. That would probably also make porting easier.

Stage 2 only uses SIMD for string parsing, so that should be rather trivial, but obviously stage 1 is a bit more involved. Though I don't understand enough of it to do it.

I would also like to get rid of the remaining allocs, but I currently don't have the bandwidth for it.

That said, with the latest clean up it looks like a decent v1.

klauspost avatar Dec 02 '21 15:12 klauspost

Go fallback would be useful indeed.

I needed a workaround for arm64 machines for simple things like running small tests and debugging, so I hacked together https://github.com/kiwicom/fakesimdjson . By the way, the tape is exported from the simdjson package, is the tape format considered part of the stable API?

Would simdjson-go project consider something like fakesimdjson useful enough to be included or are you interested only in more direct implementations of stages 1 and 2? Obviously something like my hack can't be used to guide ports to new architectures.

martin-sucha avatar Mar 04 '22 11:03 martin-sucha

@martin-sucha Not guaranteed, which is why we are still at v0.x. We have no plans to change it, but only API and the serialized format can be considered stable.

You are welcome to send your repo code as a PR, if it makes sense to add.

klauspost avatar Mar 04 '22 16:03 klauspost

the original simdjson has some support of the arm64 https://github.com/simdjson/simdjson/tree/master/src/arm64

stokito avatar Nov 22 '22 10:11 stokito