Re: More on Lisp structures performance
"Yuri Davidovsky (as work at disclosure dot ie)" <[email protected]>
| Newsgroups | gmane.lisp.lispworks.general |
|---|---|
| Message-ID | <[email protected]> |
> On 23 Jan 2026, at 19:44, David McClain <[email protected]> wrote: > > Probably you don’t compare to zero. Rather you look at the Minus bit in some control register, and branch when that first happens. Just needs to check a single bit to detect the end condition. That is an interesting one. I think it is possible on ARM to decrement a register value and set the zero flag at the same, so both iteration counting and loop termination check could be performed in a single go, basically. If so, it means we can reduce a loop iteration overhead from 3 cycles (compare, increment, jump back) to just 2 (decrement/compare, jump back), which is 33% reduction. Not bad. Will definitely be checking this one out. We probably won’t be able to get LW to do it, but that is still a nice trick to have up the sleeve. _______________________________________________ Lisp Hug - the mailing list for LispWorks users [email protected] http://www.lispworks.com/support/lisp-hug.html