[REBOL] Re: callbacks
From: moliad::gmail at: 1-Nov-2007 1:01
this is the FINAL mail about this topic from me, and its a bit surprising.
Its a happy conclusion, at least.
I did a merge of two of the functions within peekpoke.r added a few tricks
to it and called it memcopy. I include it here and I hope ladislav will
include it withing the official distribution. there are two reasons why
this function is a complement to what is already there:
* it solves the issue of the [save] being a memory leak completely. in fact,
I do not use [save] in the function at all. this was the solution I
intended to test tonight as a fix to the GC issue. and its completely and
100% GC friendly. In fact, the GC really does recycle the structs itself
and the original memory address is in fact allocated by an external source
(best of both worlds).
* its MUCH faster than calling the memory? function using [save] option
within struct even though the basis of the memcopy function uses all of the
same code! don't ask me why, I've been splitting my head enough for the
last 3 days. ;-)
in my tests which use this new function, the application in a tight loop
(with no console activity) doing requests on the relavance database (shown
at devcon 2007) was 20% faster, but this includes the actual query itself,
which takes most of the time, so its possible that the function by itself,
is like twice as fast (I don't have time for further benchmarking).
so, Ladislav, if you want to add it, do so, I'll be happy if I did a little
part in your powertool library :-)
On 11/1/07, Maxim Olivier-Adlhoch <moliad-gmail.com> wrote: