Performance issues LC8 versus earlier versions.

Monte Goulding monte at
Tue Aug 23 19:50:37 EDT 2016

> On 24 Aug 2016, at 9:06 AM, Monte Goulding <monte at> wrote:
> After reviewing the code path I see that there is an attempt made to parse the binary value into a number to try and compare numerically before doing the binary comparison. It may be we can change the order here and if both left and right are binary just compare the memory first.

I’ve made this patch <> to get the ball rolling on improving the performance here. However, it will currently break any number comparisons where the strings are different but the numbers are the same such as octal to decimal. It only breaks them if they are both currently in binary strings. It is possible I think to work out if both sides are binary and of a size that they are clearly not numbers (or at least LC can’t represent them as numbers) then do a binary comparison there. Then try and covert to numbers and then check again if they are binary. Of course I may be worried over nothing because people should be decoding binary strings before they try and use them as numbers anyway...

Just moving the code as I did above brought my test of your code on an 8.5 MB file down from 60ms to 5ms.



More information about the Use-livecode mailing list