3 ms·
> without the need to write assembly code You basically are writing assembly with these intrinsics.
by skookumchuck 9y ago
> without the need to write assembly code
You basically are writing assembly with these intrinsics.
- Negative1 9y agoNot true -- this is substantially more portable (the GNU compiler for instance will even give you fallback instructions). I number of years ago I wrote PPU intrinsics (so not Intel, but similar) wrapped via macros that worked on both the Xbox360 and PS3 PowerPC processor. On one instance I can remember (frustum culling in a complex scene graph) I saw a 3ms frame time delta. This was a few days of development time well spent. I'm guessing these intrinics map 1:1 to some AMD equivalent. Oh, looky here: https://msdn.microsoft.com/en-us/library/hh977022.aspx https://msdn.microsoft.com/en-us/library/hh977022.aspx
- stagger87 9y agoI get why you are saying that, but with intrinsics and C++ I can write template functions that compile to any data type(float/double) or any instruction set (SSE/AVX) that can be reused and inlined anywhere in my codebase, and I just let the compiler take care of register allocation, and most of the time the compiler (VC++ in this case) generates very optimal assembly. It's just so far away from assembly for this use case.