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.
'is empty' and some = are much slower
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Livecode Staff Member
- Posts: 192
- Joined: Thu Apr 18, 2013 2:48 pm
Re: 'is empty' and some = are much slower
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
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
Re: 'is empty' and some = are much slower
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.
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.
Re: 'is empty' and some = are much slower
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.
This is 2-4 times longer than the same operation with a codeunit.