On Wed, Oct 26, 2022 at 4:33 PM Eric LK <tr...@lefauve.org> wrote:

> "John R. Hogerhuis" <jho...@pobox.com> wrote:
> > ?MID$(H$,A/16+1,1);MID$(H$,AMOD16+1,1);" ";
>
> It would be slightly faster with:
> ?MID$(H$,A\16+1,1);MID$(H$,(AAND15)+1,1);" ";
>
> The biggest difference is the integer division, which to be honest
> surprised me, since the variables are already integers.
> Perhaps they are cast into regular (float) values before the division
> is attempted?
>
>
>
Probably gets promoted because of the constant 16. Default for constants is
double precision float... so I guess make it 16% explicit? I don't know if
that syntax is correct. BASIC seems to be happy with it.

-- John.

Reply via email to