minio / simdjson-go

Golang port of simdjson: parsing gigabytes of JSON per second
Apache License 2.0
1.8k stars 85 forks source link

Avoid using BP register #34

Closed klauspost closed 3 years ago

klauspost commented 3 years ago

Avoid using BP register when using zero frame, since it confuses profiling and vet check will be in next version.

Needs test on AVX512.

See discussion on Slack and golang-dev

https://gophers.slack.com/archives/C6WDZJ70S/p1598210629000900 https://groups.google.com/g/golang-dev/c/aLn9t8tKg2o/m/Kw-N7lUuBAAJ

Summary:

  • BP should be callee-save (poorly documented, even some standard library assembly didn't handle this correctly until recently)

  • BP "will be saved automatically if there is a nonzero frame size" https://golang.org/cl/248260

  • Use the "nonzero frame size" hack in the case where BP has been used