This post has been de-listed (Author was flagged for spam)
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
I'm working on an application that needs to be high-performance during runtime. I'm embedding a bunch of files into the binary with embed
and accessing them via an FS
. When doing this in embedded files, are they read from memory (i.e. the entire binary is in memory during execution, so these file reads hit RAM), or are they from disk as-needed?
I could test this but I wasn't able to find any definitive answers online, and was curious if others had already looked into this. I'm asking because if they're coming from a disk read, I could read them all into memory for faster access during runtime at the expense of some memory. Has anyone experimented with this?
Post Details
- Posted
- 3 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/golang/comm...