3 ms·
> The problem I believe stems from some misconceptions, and some historical precedents in the Go community. It's not just "historical precedents in the Go comm
by masklinn 8y ago
> The problem I believe stems from some misconceptions, and some historical precedents in the Go community.
It's not just "historical precedents in the Go community" it's "ongoing in Go itself": Go's developers will try as hard and as long as they can to perform raw syscalls even on platforms where it's not officially supported, and even on the one platform where it is genuinely actually supported they'll do raw vDSO calls (which are not) which predictably blows up (https://marcan.st/2017/12/debugging-an-evil-go-runtime-bug/ https://marcan.st/2017/12/debugging-an-evil-go-runtime-bug/).
[0] which is pretty much all of them aside from Linux, Golang 1.11 finally stops performing raw syscalls on OSX
- nhooyr 8y agoIt uses ago for system calls on macOS and linux?
- masklinn 8y agoI don't know what you're asking.
- telotortium 8y agoI presume cgo?
- amluto 8y agoRaw vDSO calls are absolutely supported. The thread you linked is about a Linux kernel that was miscompiled due to a demented Gentoo-hardened toolchain.
- Immortalin 8y agoOther than buffering, why are libc calls faster than system calls?
- masklinn 8y agolibc calls are not faster than system calls.
- Immortalin 8y agoExplain this comment: https://news.ycombinator.com/item?id=18057649 https://news.ycombinator.com/item?id=18057649
- masklinn 8y agoThis comment is saying that the overhead of the libc calls is (or should be) almost nothing compared to the cost of the syscall itself. The libc calls wraps the syscall, it can't be faster (vDSO aside).
- Immortalin 8y agoAh! That makes sense now. I thought it would be impossible for LibC to be faster than a syscall short of it cannibalizing the kernel.