JuliaLang/julia — pull request #5412 by stevengj (2014-01-15 18:02:51+00:00)
Title: don't promote integer division (fix #5409)

This modifies the `div`, `rem`, and `mod` operations so that they don't perform any automatic promotion. As explained in #5409, there is no reason to promote the arguments or results of these operations (since there is no possibility of overflow), and there is a substantial performance penalty for doing so in 64-bit mode.

(Note: I would have used `for (I,Ui) in ((Int8,Uint8), ....)` with `@eval` to generate all of these methods, but I got a bizarre error `error during bootstrap: LoadError(at "sysimg.jl" line 39: LoadError(at "int.jl" line 92: ErrorException("string not defined")))` even though I wasn't explicitly calling `string`.)