how to hold lists
Fri May 12 10:20:40 CEST 2006
On 2006-05-12 09:56, Yani Dzhurov wrote:
> How would it better and faster to hold them:
> -as macros
> -define(LIST1, [a,b,c,…..]).
> or have a function which returns it
> get_list1()-> [a,b,c,….].
macros will force a recompile every time you want to change a list.
in that respect a function is better.
macros might be very slightly faster. measure and compare to your
requirements. then you know if you can take the better solution, or must
take the very slightly faster one.
More information about the erlang-questions