Using pragma intrinsic (sqrt, pow) in c #?

C ++ Summary

Using the command #pragma intrinsicin the preprocessor section of your code will significantly increase the speed of most calls to mathematical functions.

#pragma intrinsic(sqrt, pow)

The above code allows most calls to mathematical functions to be sent directly to the mathematical coprocessor, rather than sent to the function stack.

Question

Is there any way to do this in C #? Besides rewriting the built-in functions to do something like that. As, for example, it is customary to use the power of two, so this would be appropriate, but this is not what I'm looking for:

public double Pow2(double value)
{
    return (value * value);
}
+5
source share
1 answer

# "#pragma intrinsic", :

#

JIT .

+3

All Articles