|
From: | Tony Garnock-Jones |
Subject: | Re: [Chicken-users] A more detailed plea for help with FFI... |
Date: | Thu, 16 Dec 2004 15:38:14 +0000 |
User-agent: | Mozilla Thunderbird 0.8 (Macintosh/20040913) |
Ed Watkeys wrote:
It runs on my machine in about 0.8 seconds. Doing the math, that comes to about 1100 processor cycles per malloc()/free() pair. That's about one percent of the time delta.Felix already has a pretty good suspect: finalizer dispatching code that does a linear search through a list.
Yep, ok, I take it back - malloc/free in this case is certainly far lighter than the finalisation code. :-)
On the other hand, 1100 cycles is pretty appalling; one neat nugget of information from Richard Brooksby's talk on the MPS garbage-collection system last night was that during the development of MLWorks, they measured the entire overhead of a malloc/free pair in the ML system to be on average *two and one half instructions per allocation*. Two instructions for the alloc, and one half for the garbage collection overhead. Just amazing...
Tony
[Prev in Thread] | Current Thread | [Next in Thread] |