Re: More on compiler optimization
"Yuri Davidovsky (as work at disclosure dot ie)" <[email protected]>
| Newsgroups | gmane.lisp.lispworks.general |
|---|---|
| Message-ID | <[email protected]> |
> On 13 Feb 2025, at 15:38, Paul Werkowski <[email protected]> wrote: > > The cached permutation vector has the pre-computed bit reversed indices. The bit-reverse function uses that vector to actually rotatef the two values. In that example only 12 pairs of values are swapped. How is that thrashing? Ok, I see now. I got confused by the (rotatef) references in the def-bit-reverse macro, I apologise for this. It seems like this approach is more verbose than index -> bit-reversed-index target-array[bit-reversed-index] = source-array[index] although I just did a quick search on this particular algorithm you are using and it appears to be modest in the number of iterations required so there should be no performance issues.