Question

How do I parallelize my F# program using SSE3 instruction set? Does the F# compiler support it?

OTHER TIPS

.Net doesn't talk to the hardware at that level. If you want explicit control over the instruction set used, you'll need to call out to a library written in a more appropriate language. C/C++ comes to mind.

Probably not useful, but you can play with the internal fields on a delegate to make it call to arbitrary code: http://www.atrevido.net/blog/2005/01/28/Inline+X86+ASM+In+C.aspx

See the comments for more caveats and other approaches. The benefit of playing with a delegates target directly is (AFAIK) you won't get a managed-unmanaged transition as if you did GetDelegateForFunctionPointer or other interop approaches.

On the downside, this means you have to code it by hand and make sure the calling conventions line up and so on. It's probably fragile, and the delegate call overhead might make it not worth it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top