Closed jenn-k-f closed 3 months ago
This issue (purego
disabling unsafe
instead of just assembly and cgo) was raised by one of the TinyGo developers at the time https://github.com/golang/go/issues/23172#issuecomment-2000390548 .
It is of course clumsy, but pragmatically it seems reasonable, given that it is backwards compatible. Feel free to open a PR.
Merged.
Hello! I am currently using tinygo with msgp. However, tinygo version 0.31.0 started passing the flag
purego
which is causing the performance to take a hit, despite being okay with using the unsafe library.I'd like to propose adding another flag into the
msgp/unsafe.go
andmsgp/purego.go
so that even if the purego flag is true, we can bypass and still use the unsafe library by setting another flag. Keeping the purego flag so that current uses aren't impacted.ie) Change
msgp/purego.go
from:to:
With a similar change in
msgp/unsafe.go
Thanks!