[erlang-questions] How fast is to retrieve date from ETS table

Gleb Peregud gleber.p@REDACTED
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).
>> [255,216,255,225,63,254,69,120,105,102,0,0,73,73,42,0,8,0,0,
>> 0,10,0,14,1,2,0,32,0,0|...]
> 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 mailing list