Yes 4000 times faster, once you take your shoes off.

One char, 4 char and 8 char replacement is fast.

on mouseUp
  repeat with i = 1 to 1000000
    put "1234567890" after dd
  end repeat
  put 9999990 into a
  get the long seconds
  put "a" into char a of dd
  put "abcd" into char a to a+3 of dd
  put "abcdefgh" into char a to a+7 of dd
  put the long seconds - it
end mouseUp

Michael

On Jan 20, 2005, at 12:38 AM, Richard Gaskin wrote:

Richard Gaskin wrote:
Chipp Walters wrote:
> Richard Gaskin wrote:
>> I've been pondering this new speed enhancement to same-size
>> chunk replacements, specifically in regard to image processing.
>> Since much of what image processing involves is replacing a
>> specific number of bytes, I wonder if any of the folks here
>> have made any recent experiments with writing image filters
>> in native Transcript. With the sort of speed Dar reports we
>> may find that some types of filters can run acceptably well
>> in Transcript alone.
>
> I did write some compositing and blur/sharpen filters in
> transcript some time ago, but I don't know the details of
> the 'same-size chunk' replacements. Where can I find more info?
All I know is what Dar posted here, but it sounded really tasty. Apparently he made a suggestion to Scott Raney about ways to optimize operations in which a string of a given length is used to replace a substring of the same length within a larger chunk.
In previous versions a very generalized approach was used for all replacement operations, requiring that the data be copied during the replacement, which can be computationally expensive with large chunks.
Since the data being inserted is the same length as the data being removed the handle size doesn't change, allowing the operation to work in-place, without copying.
IIRC, Raney reported that the new method should improve speed by roughly 4000 times for those cases.
Dar - got the details for us?

Found the Bugzilla notes: <http://support.runrev.com/bugdatabase/show_bug.cgi?id=586>
_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to