Coming soon - Get a detailed view of why an account is flagged as spam!
view details

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.

26
Performance Question: Are reading embedded files with the "embed" package disk-reads, or memory-reads?
Post Body

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?

Author
Account Strength
0%
Account Age
17 years
Verified Email
Yes
Verified Flair
No
Total Karma
22,835
Link Karma
1,600
Comment Karma
21,152
Profile updated: 8 months ago
Posts updated: 10 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
3 years ago