[erlang-questions] Performance of type_to_type functions
Thu Sep 22 21:51:24 CEST 2016
> > integer_to_binary
> > atom_to_binary
> > ...
> how about the performance of this type to type function?
> can I using this function wildly?
You can, but you shouldn't because they need to allocate and initialize memory
in order to produce the alternative value representation you're asking for
(say, from the integer 55 to the list [$5, $5]). And that's in addition to
whatever type checking they have to perform first.
So no they're not "free".
More information about the erlang-questions