[CM] Failed to build S7 Scheme using MSVC when HAVE_OVERFLOW_CHECKS is enabled

bil at ccrma.Stanford.EDU bil at ccrma.Stanford.EDU
Tue Dec 31 06:05:06 PST 2024


Thanks very much for that code!  I think there's a small bug in the
subtract case.  They reuse the add_overflow code, apparently
assuming I'll pass -B, but B might be the most negative integer
which can't be negated.  Also the multiply code is going to be
very slow.  The idea behind the gcc/clang __builtins is that
they can often use hardware support -- "conditional jump on
overflow" -- and the check will not affect the speed of the
multiply very much.  I haven't re-run the timing tests in a
long time, but my recollection is that the slowdown was not
noticeable in s7's context.  I'll try those tests again both
with and without the checks (and with these laborious MSVC checks)
and see how bad it is.  My preference would be to omit the
tests if they affect the timings too much -- anyone using
ints in the 2^63 range (or 2^32 for *) ought to have some
idea of what they are doing.




More information about the Cmdist mailing list