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-


    • Changed type Mike Feng Wednesday, September 19, 2012 9:12 AM Feedback
    Friday, September 14, 2012 9:56 PM

All replies

  • Critical applications should still be written in C++.
    Friday, September 14, 2012 10:04 PM
  • Hi Dlux,

    Welcome to the MSDN Forum.

    You can submit your feedback here: http://connect.microsoft.com/VisualStudio 

    And Microsoft will check it later.

    Best regards,

    Mike Feng
    MSDN Community Support | Feedback to us
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, September 19, 2012 9:12 AM