4 ms·
You could specialize for primitives, e.g. under the hood generate complexExpression_int() and complexExpression_ref(). It wouldn't be too bad in terms of code s
by wtetzner 11y ago
You could specialize for primitives, e.g. under the hood generate complexExpression_int() and complexExpression_ref(). It wouldn't be too bad in terms of code size, because you only have to specialize primitives, and all reference types can share the same implementation.
- david-given 11y agoYes, that'd be the obvious thing to do, but I think right now it doesn't (I could be wrong; I haven't looked at the code for ages). I did at one point try to specialise everything. The results were hilarious... var a = cons(cons(cons(cons(empty, 1), 2), 3), 4); As the left-hand-side of each cons was a slightly different type, it ended up generating four different versions of the cons function!