dcooper33
Lifetime Supporting Member + Moderator
DIV (S:13), MOV - 24.06 microseconds
AIC - AEX - ACI - 139.92 microseconds
Repeat Subtract - 24.2 microseconds (1 execution) - 217.8 microseconds (9 executions)
Wow, well I stand corrected. That's very surprising. It looks like a wash on average between the String and Repeat-Subtract method.
I tried the DIV S:13, MOV approach on a SLC 5/04 today, and I never could get a remainder error out of it. I probably plugged 50 different 4-digit integers in without an incorrect 3-digit result.
That being said, I would still sacrifice speed for peace of mind. I would go with the SUB/JUMP routine just because it looks like it would be easier for a maint. man to cipher out at 3am then String instructions. Your average tech is not going to want anything to do with Strings at anytime of the day.