Ok, brief on phase 3 (flag removal) optimisation.

Felix current does this: 

* sweep marking reachable objects.
* Scan objects looking for garbage (unmarked)
  execute the finaliser when found, and post the object
  onto a 'to-delete' list
* delete everything on the to-delete list

The two phase disposal is because a finaliser for garbage
object A may refer to a garbage object B -- hopefully
it will work whether B is finalised or not, but it is
allowed to assume B actually exists, so B can't be deleted,
and in general, deletion must be postponed until finalisation
is completed on all objects.

For reasons I don't understand, there is a finalisation
flag saying if the object has already been finalised.
I propose to remove that. The 'garbage' flag will be encoded
in the 'length' field of the Judy array. This requires masking
it out on every access during scanning, but it allows the
reaper pass to run entirely on the Judy array without 
accessing the actual objects, improving cache coherence:
the exception is if the object requires finalisation,
in which case the finaliser has to be found and executed
on the object.

This will remove two bools from the frame_t header,
effectively 1 machine word.


-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Judy-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/judy-devel

Reply via email to