none
Future 64-bit Multiply/128-bit Divide RRS feed

  • General discussion

  • Are there any plans to extend the CIL/CLR to support 64x64->128-bit multiplies and 128/64->64 divides?  On x64 CPUs, assembly instructions are available for both of these operations, but the CIL Mul/Div instructions support only 64-bit results/parameters.  Since we can't write a NET routine in *native* assembly (if I'm wrong, someone please correct me), the only alternative of calling one from a NET routine is far too slow due to the overhead of the managed->unmanaged transition.  Unfortunately, you get the same hit if use the compiler intrinsic _mul128, and there is no intrinsic for the divide instruction.  The overhead is so big it eliminates any of the performance gains of the assembly routine.

    We're writing a real-time data acquisition system that uses 128-bit integers and would like our performance to be as fast as possible.

    David L-


    Dlux

    Friday, September 14, 2012 9:56 PM

All replies