[erlang-questions] Most performant way to store/search a bag

AD <>
Thu May 3 15:05:50 CEST 2012


yes of course, i was just measuring worst case across both.

@Ulf good point.

Will take suggestions and try a few other tests.

-AD

On Thu, May 3, 2012 at 1:38 AM, dmitry kolesnikov <>wrote:

> Hi,
>
> In your test script select does a full table scan, emulates foldl. But
> your use-case is foldl through subset. Should you measure performance
> of that case?
>
> Best Regards,
> Dmitry >-|-|-*>
>
>
> On 3.5.2012, at 7.57, Ulf Wiger <> wrote:
>
> > 3 maj 2012 kl. 05:35 skrev AD <>:
> >
> >> gproc seems to use an ordered_set ETS table and then an ets:select() to
> match against the keys it needs.  I did some basic tests with a 5 million
> row ETS ordered set table and ets:foldl still seems to come out faster.
> >
> >
> > The key to good select() performance in an ordered_set table is to
> ensure that the first part of the key pattern is bound. In your test, the
> key pattern was a free variable, forcing the match spec evaluator to test
> every single record in the table.
> >
> > Gproc strives to do 'bounded selects' as much as possible.
> >
> > BR,
> > Ulf W
> >
> > Ulf Wiger, Feuerlabs, Inc.
> > http://www.feuerlabs.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120503/a6f6063e/attachment.html>


More information about the erlang-questions mailing list