On Mon, Aug 12, 2013 at 3:06 PM, Mike Bonner <bonnm...@gmail.com> wrote:

> Just did a quick test with 1m lines getting the last char of each (for each
> line loop) using -1 and last, last is faster. 266 milliseconds for "last
> char.." and 318 for char -1
>


Confirmed here. In my test I was getting about 160 milliseconds for last
char, but about 200 milliseconds for char -1. Oddly enough, my items were 4
chars long, and char 4 took about 175 milliseconds.

I also tried the test with much larger strings several hundred k characters
long, and the -1 vs. last delta holds there as well.

I know I sound like a broken record, but I dearly look forward to the day
when I can simply write a language module so that "char -1" transparently
becomes "the last char" behind the scenes.
_______________________________________________
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