We already provide all the necessary intrinsics for 32-bit arithmetic, so
it's pretty easy to write a module that redefines arithmetic operations on
integers to do this, but it's definitely some work that would need to be
done. I'd be in favor of having this option. The biggest issue is that it
would only apply in lexical scope. I.e. even if Int16 + Int16 => Int16,
you'd still have sum(Int16[]) => Int, since sum is defined in Base. So to
get the full effect, this would probably need to be a global switch, at
which point you're really just talking about running in 32-bit mode on a
64-bit system.


On Wed, Jan 15, 2014 at 5:32 AM, Miles Lubin <[email protected]> wrote:

> Just to throw in my two cents, I don't think it's the right approach to
> brush off a class of performance optimizations that has a valid use case in
> practice and can lead to a 4x speedup. There should at least be *some* way
> to access nonpromoting integer operations, even if the default operators do
> promote.
>

Reply via email to