'is empty' and some = are much slower

Discussion about LiveCode Global Jam events and activities

Moderators: heatherlaine, Klaus, FourthWorld, robinmiller, kevinmiller

Post Reply
DarScott
Posts: 225
Joined: Fri Jul 28, 2006 12:23 am
Location: Albuquerque
Contact:

'is empty' and some = are much slower

Post by DarScott » Fri May 23, 2014 10:16 pm

In an earlier dp 'is empty' was fast for a million byte string. Now it takes over a 100 us.

In an earlier dp, equality of two large strings with the first and last bytes different was very fast. Now it takes 250 us, about the length of time to get the length of the string.

Everything else is just slightly slower in dp5.

I'm on Mavericks.

livecodeali
Livecode Staff Member
Livecode Staff Member
Posts: 168
Joined: Thu Apr 18, 2013 2:48 pm

Re: 'is empty' and some = are much slower

Post by livecodeali » Fri May 23, 2014 10:42 pm

Hi Dar,

Thanks for this - I'm not sure what has caused this but there were some more significant changes to the string class between dp 3 and 4, which might be why. Feel free to reopen your original bug report, or open a new one- that'll help us remember to investigate it.

Ali

DarScott
Posts: 225
Joined: Fri Jul 28, 2006 12:23 am
Location: Albuquerque
Contact:

Re: 'is empty' and some = are much slower

Post by DarScott » Fri May 23, 2014 11:50 pm

I found another test stack and it shows much improvement (comparing what was saved in the output field when the stack was saved).

In particular, 'the number of' is fast for several chunks after one is obtained.

Concatenation is much faster.

Getting characters in the middle of a long string is fast!

But the byte seems disfavored. It takes twice as long to 'get byte i of longstring' as it does to get a codeunit the second time. In particular, it takes a long time to get the first chunk of a long string. It takes 0.38 ms to get any byte of a long string, first or not.

I wonder if earlier I was looking at a previous test for a 6.7 or something.

DarScott
Posts: 225
Joined: Fri Jul 28, 2006 12:23 am
Location: Albuquerque
Contact:

Re: 'is empty' and some = are much slower

Post by DarScott » Fri May 23, 2014 11:58 pm

It is still over a ms to delete byte from the front of a long string and a half ms to delete from the front. It takes over a ms to get the first byte and a half to get the first.

This is 2-4 times longer than the same operation with a codeunit.

Post Reply

Return to “LiveCode Global Jam”