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

Ulf Wiger ulf@REDACTED
Wed Jan 11 17:04:52 CET 2012


Thanks for correcting me. I thought as much*, but then did some sloppy grep:ing and was misled. :)

I assume it's copy_struct() in one direction (storing) and copy_shallow() in the other?

BR,
Ulf W

* As in, Björn G told me some 5-6 years ago, but I forgot the particulars.

On 11 Jan 2012, at 16:59, Sverker Eriksson wrote:

> Ulf Wiger wrote:
>> :
>> The actual code is in $ERL_TOP/erts/emulator/beam/copy.c (copy_struct()), or:
>> 
>> https://github.com/erlang/otp/blob/master/erts/emulator/beam/copy.c#L191
>>  
> Copy from ETS actually uses copy_shallow() which is simpler and even more effective as the term is known to be contained within one continuous block.
> 
> https://github.com/erlang/otp/blob/master/erts/emulator/beam/copy.c#L919
> 
> 
> /Sverker, Erlang/OTP Ericsson
> 
> 
> 
> 
> 
> 
> 




More information about the erlang-questions mailing list