Jonathan S. Shapiro wrote:
I am not clear why size is an issue at all. The issue is comparison with
less-than? and greater-than? [...] The problem is that we need to do magnitude comparisons in order to avoid very expensive set operations.
Ah, I took "magnitude comparison" to mean "size comparison". My mistake.
I don't see how you could perform magnitude comparisons without a type-specific function, unless you traverse the entire structure. Sometimes this would be faster than calling a type-specific function, and sometimes slower for deeply nested structures. Inlining the comparison function is a possibility.
Isn't the magnitude of a reference type simply the magnitude of the pointer? The pointer is what is used in constructing types after all, so its contribution to the size of the constructed type is the size of the pointer.
Not in the case where the garbage collector may result in a heap where
the objects have been reordered in memory.
Given my misunderstanding of 'magnitude', it's now clear that my statement is false.
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev
