Lackwit implements a polymorphic type inference algorithm. Explain in your own words how the example illustrates polymorphic type inference. The power of this is that callers of id get accurate type information. In other words, in some situations, safe typing has a cost while in other situations, safe typing can allow optimizations that would be perhaps very hard to do for languages such as C. GIve one example in support of each argument. Assume that you have a language for which you can correctly find all the pointers in the stack and in the heap.
Copying is fast since free space is compacted.
Coping cost depends only on live objects. If most objects are dead, copying may be faster, otherwise mark and sweep and reference counting will be faster. The other two algorithms will collect cycles.