Pattern matching vs. ETS lookups
Vance Shipley
vances@REDACTED
Tue Feb 17 09:30:43 CET 2004
} With only 3000 random entries:
}
} list 14647, 221.448, 814.819
} gb_trees 14648, 154.442, 551.877
} ets 14648, 155.908, 558.271
For completeness I made a function clause version of the server
with 3000 clauses:
clauses 14663, 324.492, 1143.447
I tried to make a clauses version of the 65K test however
it's been compiling for over an hour now so I think we can
conclude that that model isn't workable.
One thing I noticed during this testing was that the gb_trees
and tuples versions of State cause some problems with error
logging. It seems that while lists are throttled and replaced
with a tail of ... tuples are not. When there was a crash
we got 65 thousand lines in the error report. In a way this
is an advantage over the ets version as we have all the state
data avilable in a crash to portmortem. We don't really want
all that printed to stdio though.
-Vancxe
More information about the erlang-questions
mailing list