Search found 203 matches
- Sat May 24, 2014 8:33 pm
- Forum: LiveCode Global Jam
- Topic: timing vs size of byte string
- Replies: 6
- Views: 10709
Re: timing vs size of byte string
The loop time for touching every byte with 'repeat for each byte' is constant and small, about 260 ns on my machine. The time to touch all the bytes in a byte string with the number of bytes = n is 260n + 70000 in ns. That is about 70 microseconds plus a quarter of a microsecond for each byte.
- Sat May 24, 2014 3:39 pm
- Forum: LiveCode Global Jam
- Topic: Possible Bug with Sentence Chunk
- Replies: 3
- Views: 8616
Re: Possible Bug with Sentence Chunk
I'm guessing that the LiveCode sentence is based on text segmentation in Unicode 6.3. A sentence in 6.3 includes the ending punctuation, trailing spaces and paragraph separator (including CRLF, ASCII CR, LF and PS). I don't know how strict LiveCode is in using the Unicode definition of sentence, but...
- Sat May 24, 2014 7:05 am
- Forum: LiveCode Global Jam
- Topic: timing vs size of byte string
- Replies: 6
- Views: 10709
Re: timing vs size of byte string
These tests were made by adding bytes to the end of a byte string and doing tests every 1000.
- Sat May 24, 2014 7:04 am
- Forum: LiveCode Global Jam
- Topic: timing vs size of byte string
- Replies: 6
- Views: 10709
Re: timing vs size of byte string
Getting the number of bytes of a byte string also depends on the length. (I think it is remembered though.) Something interesting is going on near a million bytes. Just under that, though, getting the length seems to take 150 microseconds. I have seen it take longer though, and in one test it seems ...
- Sat May 24, 2014 6:43 am
- Forum: LiveCode Global Jam
- Topic: timing vs size of byte string
- Replies: 6
- Views: 10709
Re: timing vs size of byte string
The time to add a byte to the end of a byte string is very small and constant, about 0.0003 ms on my computer (300 ns).
EDIT: And the time to add a byte to the front is about 300 ns plus 60 ns for every 1000 bytes. So, for large strings there is a slight advantage to adding bytes to the back.
EDIT: And the time to add a byte to the front is about 300 ns plus 60 ns for every 1000 bytes. So, for large strings there is a slight advantage to adding bytes to the back.
- Sat May 24, 2014 6:35 am
- Forum: LiveCode Global Jam
- Topic: timing vs size of byte string
- Replies: 6
- Views: 10709
Re: timing vs size of byte string
The time to get a byte is similar.
- Sat May 24, 2014 6:31 am
- Forum: LiveCode Global Jam
- Topic: timing vs size of byte string
- Replies: 6
- Views: 10709
timing vs size of byte string
The most important chunk operations might be characters. However, for some of what I do, bytes are important. Here are some characteristics of how long it takes to do some things regarding a single byte of a long byte string. I'll start out with deleting a byte at an end. For a million bytes it take...
- Sat May 24, 2014 6:23 am
- Forum: LiveCode Global Jam
- Topic: 0.2 s to add a new element to a large array NOW WITH GRAPH!
- Replies: 15
- Views: 21231
Re: 0.2 s to add a new element to a large array NOW WITH GRA
I'm guessing that as each hash bucket gets filled, a bigger size and maybe bigger kind of bucket is created. They are good hashes, so they fill about the same time.
- Sat May 24, 2014 2:29 am
- Forum: LiveCode Global Jam
- Topic: 0.2 s to add a new element to a large array NOW WITH GRAPH!
- Replies: 15
- Views: 21231
Re: 0.2 s to add a new element to a large array NOW WITH GRA
Hi, Al! Here is what I got with less stat gathering overhead and after a reboot:
- Sat May 24, 2014 2:01 am
- Forum: LiveCode Global Jam
- Topic: 0.2 s to add a new element to a large array NOW WITH GRAPH!
- Replies: 15
- Views: 21231
Re: 0.2 s to add a new element to a large array NOW WITH GRA
Here is the same data displayed with lines instead of dots:
- Sat May 24, 2014 1:40 am
- Forum: LiveCode Global Jam
- Topic: Hang on quit
- Replies: 2
- Views: 8405
Re: Hang on quit
I just quit from the menu. All of the windows closed and the menu on the main display switched to another application, but the menu on the second display was still there. (I have new-fangled Mavericks menus.) The dot on the dock icon was there. Force Quit said it was not responding. I was able to fo...
- Sat May 24, 2014 1:35 am
- Forum: LiveCode Global Jam
- Topic: 0.2 s to add a new element to a large array NOW WITH GRAPH!
- Replies: 15
- Views: 21231
Re: 0.2 s to add a new element to a large array
Here is a plot of the time to build a array with integers as keys and integers as values:
- Sat May 24, 2014 12:53 am
- Forum: LiveCode Global Jam
- Topic: 0.2 s to add a new element to a large array NOW WITH GRAPH!
- Replies: 15
- Views: 21231
Re: 0.2 s to add a new element to a large array
My mistake. That is not the time to add the millionth element. That is the time to add the 561110th element of my test array.
Adding elements gets very slow between 553000 and 563000. And it somewhat slow over a wider range of 533000 through 563000.
Adding elements gets very slow between 553000 and 563000. And it somewhat slow over a wider range of 533000 through 563000.
- Sat May 24, 2014 12:26 am
- Forum: LiveCode Global Jam
- Topic: 0.2 s to add a new element to a large array NOW WITH GRAPH!
- Replies: 15
- Views: 21231
0.2 s to add a new element to a large array NOW WITH GRAPH!
It takes a fifth of a second to add the millionth entry into an array.
Slow byte strings and slow arrays make for very boring days.
Slow byte strings and slow arrays make for very boring days.
- Fri May 23, 2014 11:58 pm
- Forum: LiveCode Global Jam
- Topic: 'is empty' and some = are much slower
- Replies: 3
- Views: 8794
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.