[m-rev.] for discussion: undefined behaviours in int.m

Mark Brown mark at mercurylang.org
Fri Oct 21 22:49:24 AEDT 2016


On Fri, Oct 21, 2016 at 7:24 PM, Zoltan Somogyi
<zoltan.somogyi at runbox.com> wrote:
> I think a bigger part is due to the fact that each numeric type has
> a very similar set of operations defined on it. Therefore when you use
> those operations, you get ambiguity in the typechecker. If you use
> N operations in a row, each of which could apply to any of M types,
> the current typechecker would need to maintain M^N type assign sets,
> and its performance falls through the floor.

If that's true we'd see O(2^N) performance due to the ambiguity
between int and float, but I haven't observed that.

Mark


More information about the reviews mailing list