Unicast 20k messages, $500-$1000 bounty
mats cronqvist
masse@REDACTED
Thu Jul 16 17:54:58 CEST 2009
Paulo Sérgio Almeida <psa@REDACTED> writes:
> Joel Reymont wrote:
>>
>> On Jul 16, 2009, at 2:57 PM, Paulo Sérgio Almeida wrote:
>>
>>> - obtain the list of pids with ets:select, as in:
>>>
>>> ets:select(State#state.subs, [{{'$1', '_'}, [], ['$1']}]).
>>
>> Would it not be faster to call ets:tab2list?
>
> I have a weak memory, but I have the feeling select is faster in this
> case when you don't need all the content in the table. It is a
> built-in, it is producing less results (just a list of Pids, not of
> tuples), and then you don't have to extract the Pid from the tuples
> when traversing the list.
+1
mats
More information about the erlang-questions
mailing list