[erlang-questions] enif_make_reverse_list() vs lists:reverse()
Fri May 4 20:14:49 CEST 2012
The nif version is blocking while the bif isn't. So for long lists the nif will block the scheduler while the bif will not. If the blocking is acceptable or not is up to you. If unsure using lists:reverse is the safe choice.
Sent from me
On 4 maj 2012, at 19:26, Daniel Goertzen <> wrote:
> The documentation for enif_make_reverse_list() says ...
> "This function should only be used on short lists as a copy will be
> created of the list which will not be released until after the nif
> I have a long-ish list. Should I be opting to use lists:reverse()
> instead of enif_make_reverse_list()? I assumed they were the same and
> for my situation I can use either, but the documentation suggests the
> nif version may be worse.
> erlang-questions mailing list
More information about the erlang-questions