Handling of final delimter (was Re: "this me"?)

Geoff Canyon gcanyon at gmail.com
Mon Aug 12 18:15:27 EDT 2013


On Mon, Aug 12, 2013 at 3:06 PM, Mike Bonner <bonnmike at 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.



More information about the use-livecode mailing list