[erlang-questions] which one is more efficiency? ets or pattern match?

饕餮 <>
Wed Mar 16 09:05:45 CET 2016


erlang pattern match file could be written like :


-module(config).
get(1) -> 11,
get(2) -> 22,
.....
get(1000001) -> 12312,
get(_) -> none.


When I need get some data,
ets:lookup(some_table, some_value)
&
config:get(some_value)


Which one is more efficiency?
How much different between them?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160316/c168c767/attachment.html>


More information about the erlang-questions mailing list