[mercury-users] Flattening (was: maybe(T))
Michael Day
mikeday at yeslogic.com
Mon Oct 21 16:34:57 AEST 2002
Well, looks like the idea I've been ineffectually groping towards is
really a type flattening optimisation that could be applied in specific
cases. I've noticed the following comment in the library:
% This "fat list" representation is more efficient than a list of pairs.
And the same sentiment seems to apply to the use of maybe(T) and other
small convenience types generally. This kind of flattening can always be
applied by hand, it just requires a lot of bulky code.
I get the feeling though that type flattening would require marshalling
whenever the flattened structure had to be passed to a predicate expecting
the generic one though, which would probably kill any benefits, or at
least make it very difficult to identify when the optimisation would be
beneficial.
Michael
--------------------------------------------------------------------------
mercury-users mailing list
post: mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the users
mailing list