|
|
Christian Froeschlin wrote:
> If synchronization between threads costs more wall clock time
> than the benefit of reusing cache data across threads, it might
> be a solution to give each thread its own cache. But I don't
This is not the issue; in fact, each thread does have its own cache. The
problem is that the old code caused memory allocation to happen at run-
time, and this memory came from the global heap. This requires locking.
I made some improvements by using a memory pool for the local storage (==
less calls to new/malloc), but this needs further work. Basically we need
to drastically reduce the number of times we get memory from the global
heap, while at the same time trying to avoid getting too much memory at any
given time (which may not be needed).
-- Chris
Post a reply to this message
|
|