[erlang-questions] How fast is to retrieve date from ETS table
Wed Jan 11 12:27:09 CET 2012
On Wed, Jan 11, 2012 at 12:22, Adam Rutkowski <adam.rutkowski@REDACTED> wrote:
>> 3> L = binary_to_list(B).
> What's the reason behind this?
> You can store binaries in ETS, you should also get significantly better results retrieving them.
The question is actually about how to retrieve whole structures from
ETS. Binaries would be only referenced (as said in stackoverflow
100ms does not seem to be that much for copying 2MB of data from one
place in memory to another. Although for building such a list
cell-by-cell it seems pretty fast.
You can do the following:
- measure time to memcpy 2MB memory chunk in pure C or
- analyze how data is copied from ETS to process heap in the source code or
- wait for an answer from someone who knows it (OTP team)
More information about the erlang-questions