Page 2 of 2
Re: Comparing 16 bit Integer Square Root routines (SQRT)
Posted: Sat Feb 05, 2022 11:56 pm
by TobyLobster
The code is on the MIT license so feel free to use it or add it to your benchmark.
Thanks. I had a go at optimising your routine (I hope that's ok), by calculating initial upper and lower bounds. This gives a smaller range to search. This improves the performance, but as it stands my sqrt10.a is still a little bit faster in general and smaller (no tables).
Here's the performance of my optimised version of your routine in red:
Re: Comparing 16 bit Integer Square Root routines (SQRT)
Posted: Mon Feb 07, 2022 5:28 am
by ilmenit
This improves the performance, but as it stands my sqrt10.a is still a little bit faster in general and smaller (no tables).
Your procedure is amazing and I'm going to steal it for my project, if you don't mind

Re: Comparing 16 bit Integer Square Root routines (SQRT)
Posted: Mon Feb 07, 2022 7:43 am
by TobyLobster
This improves the performance, but as it stands my sqrt10.a is still a little bit faster in general and smaller (no tables).
Your procedure is amazing and I'm going to steal it for my project, if you don't mind

No problem, go for it!
Re: Comparing 16 bit Integer Square Root routines (SQRT)
Posted: Wed Feb 09, 2022 4:31 pm
by barrym95838
After briefly struggling with the nuts and bolts, I have tentatively concluded that
Bruce's subroutine is the likely destination for my attempts to "integerize"
MJM's subroutine. The probability of me being able to out-golf Bruce is low enough to steer me toward spending my increasingly limited attention elsewhere, after congratulating everyone for an entertaining and informative thread. Cheers!