Improper lists [was: Dialyzer v1.3.0 released]
Mon Mar 28 05:54:22 CEST 2005
Thomas Lindgren wrote:
>So storing a pair as a cons saves 33% memory. Also,
>it's generally somewhat faster to access conses than
In theory you could have a special type tag for "two element tuple"
(and even three and four elements, depending how far you want to go),
so there would be no benefit to storing a pair as a cons. The
tradeoff is that that you have to handle those new type tags all over
the place in the runtime, of course.
More information about the erlang-questions