Benchmarks for os.File vs win32File?
Opened this issue · 2 comments
I'm curious what kind of performance improvements can be seen when switching from *os.File
to win32File
for read/write operations. Are there any benchmarks available, or does anyone have anecdotal experience to share?
As far as I understand it, the advantage of win32File
is that it blocks the calling goroutine on a channel instead of in a syscall, which means the go runtime needs fewer OS threads and can schedule goroutines more efficiently.
I would expect that the underlying go runtime would use io completion ports as well, so I would be surprised to see much difference there, particularly for network sockets. (I haven't looked to see if the Go code does this, and most especially whether it does this for regular files.)
The go runtime uses completion ports for network sockets, but not for files on disk. My question is specifically about os.File
vs win32File
.