Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
do_not_redeem
4 months ago
|
parent
|
context
|
favorite
| on:
How memory maps (mmap) deliver faster file access ...
Even if the file is cached, fread has to do a memcpy. mmap doesn't.
gpderetta
4 months ago
[–]
fread is (usually) buffered io, so it actually does two additional mem copies (kernel to FILE buffer then to user buffer)
assbuttbuttass
4 months ago
|
parent
[–]
Not in Go
gpderetta
4 months ago
|
root
|
parent
[–]
oh, right, this is Go (
https://pkg.go.dev/github.com/odeke-em/go-utils/fread#sectio...
). Do the strings it return share memory with the internal buffer?
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: