Remove real type
Walter Bright
newshound1 at digitalmars.com
Fri Apr 23 15:57:36 PDT 2010
Mike Farnsworth wrote:
> There is another reason: performance, when combined with vectorized code. If
> I use 4 32-bit floats to represent my vectors, points, etc. in my ray tracer,
> I can stuff them into an SSE register and use intrinsics to really, *really*
> speed it up. Especially if I use the sum-of-products / structure-of-arrays
> form for packetizing the data. Now, I realize this is not necessarily
> possible with D2 currently, but it's not inconceivable that some D2 compiler
> would get that capability in the relatively near future.
>
> If I instead use 8-byte floats, I now have to double my operations and thus
> much of my processing time (due to only being able to put 2 items into each
> SSE register). If I use reals, well, I get the x86 FPU, which seriously
> hampers performance. And when it comes to rendering, performance is a very,
> very big deal (even in production/offline rendering).
I agree that rendering is different, and likely is a quite different thing than
numerical analysis.
More information about the Digitalmars-d
mailing list