Jerry:

> Are the math routines doing unnecessary unicode interpretation?

Mark:

> Doing type conversion on the strings-that-are-not-strings
> and then getting to the math functions.

You guys might be right, but I doubt it. Here's one reason why. I took some care to make the math test a true math test.

Notice in Root Loops:

local sQty=1234567
add 0 to sQty --> make it a true number*
put 0 into n
repeat with i=1 to sQty
  add sqrt(i) to n
end repeat

* So sQty is already binary when the loop starts.

The "1" is a string, but that only happens once and shouldn't matter. (In fact I started out with stuff like t1 just to be sure, and 0+0 into n, but it made no difference so I took it out.

After one loop at most, i and n are now binary and should stay that way. Sqrt is acting upon i (binary), adding the result (binary) to n (binary) and comparing i to sQty (binary) so in theory no conversion should be taking place until the repeat is over. So in theory we're really testing the math between versions and not the conversion.

Second reason: because (perhaps ironically) it turns out the text portions of LC, other than chunks, are actually performing better on tests than other parts. It's not my place to speculate, but maybe the attention given to the text handling code during Unicode did a lot of good! But I don't want to speculate too much; I'd better stick more to the stats. :)

Best wishes,

Curry Kenworthy

Custom Software Development
LiveCode Training and Consulting
http://livecodeconsulting.com/

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to