Optimize some ++ situations
Christofer Tornkvist (ctornkvi)
Tue Oct 27 17:08:58 CET 2020
would it be a stupid suggestion to let add a parameter of list type
to all built-in and library functions returning a list.
The additional list parameter will represent a list-tail that will be appended to the result.
Append would be accomplished by [ ListResult| MyTail ].
If this was the case, the complier can optimize code like;
erlang:atom_to_list(Atom) ++ MyTail
lists:map(Fun, List) ++ MyTail
lists:map(Fun, List, MyTail)
Or is the compiler able to see this optimization anyhow?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions