Meyer, OO and concurrency

Richard A. O'Keefe ok@REDACTED
Tue Aug 2 01:00:19 CEST 2005


I wrote:
	> > and there are still issues about copying.

Alex Arnon <alex.arnon@REDACTED> wrote:
	1) I understood that the process dictionary is on-heap.
	   So, what copying issues are there?

Remember, I was talking about the public interface and documentation.
Nowhere in that documentation is it promised that "the process dictionary
is on-heap".  The issues about copying concern the fact that we don't
*KNOW* whether/how much copying is done.  For example, an entirely valid
implementation of the process dictionary *interface* would involve a
second process holding the data, with gets and puts done by sending
messages to that other process.  There is another issue as well:  the
efficient concurrent garbage collector for Erlang that was published
relied on data in the heap not changing.  But the process dictionary
does change.  So that has *some* effect on the structure and/or efficiency
of the garbage collector.  What/how much?  We don't know.

	2) How is it implemented?

Read the source code and find out for yourself.  That's what I did.
My message even told you which file to look at.

	Put another way, what performance impact will number of keys have?
	
As with all hash tables, it's unpredictable.  It depends on what your
keys are like and whether the hash function is good with them.  There is
no substitute for doing your own benchmarks.



More information about the erlang-questions mailing list