[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Tradeoffs with resources
I am interested in using resources but can't tell where the break-even
and big-win points are from the documentation. Therefore, the following
(probably too vague) questions:
(1) How much consing does the resource facility do (independent of the froms
I supply) when an object is created?
(2) How much consing does the resource facility do (independent of the froms
I supply) when an object is reallocated?
(3) What are guidelines as to minimum size objects that are good to put
(4) How rapidly must the average object be reallocated for using resources
to make sense --- this question assumes that the longer the lifetime
of a single use, the less good the resource idea.
(5) Is the resource mechanism smart enough to release, to the GC, objects that
are not in use when the GC is prepared to reclaim them, i.e., are objects
not in use copied by the GC because the "resource array" points at them?
If these questions have been answered in the past or are deemed to not be
of general interest, please communicate directly to me.