2 ms·
even with a delayed carry, you still need to pump the data through the CPU. For a basic place where this becomes a problem, consider taking exp of each element
by adgjlsfhk1 5y ago
even with a delayed carry, you still need to pump the data through the CPU. For a basic place where this becomes a problem, consider taking exp of each element in a vector. A vectorized version of this code will spend most of it's time computing a polynomial which is just 8 fmas (in 2 chains of 4). With a dedicated fma instruction, the cpu can do each of those fmas in 4 cycles, and overlap the chains, leading to a total time of 17 cycles (assuming 4 cycle fma which is fairly standard). Doing the same computation with quires would require moving around 16x as much data, which is impossible to do as quickly.
- Dylan16807 5y agoIf you leave the quires in place you don't have that issue, though. Do your eight multiplies, feed them to a single adder, collapse the result.
- adgjlsfhk1 5y agoYou can't keep that much memory in registers easily. Just storing all those quires would 16 512 bit registers (which on x86 is all you get)
- Dylan16807 5y agoHence why my initial comment was "I'd be worried about space, but I'm not sure why time would be an issue?"