Add visit_slice
to EdgeVisitor
#986
Labels
P-high
Priority: High. A high-priority issue should be fixed as soon as possible.
visit_slice
to EdgeVisitor
#986
It is stupid to enqueue the address of each and every element of an array into a
ProcessEdgesWork
. We can enqueue slices directly.For example, when scanning an
Object[]
, instead of enqueuing&object[0]
,&object[1]
,&object[2]
, ...,&object[object.length - 1]
, we can enqueue one singleOpenJDKEdgeRange { range: &object[0]..&object[object.length - 1] }
. That saves both space and time.But we need to take into account the effect of prefetching as well as eager edge loading (See: #584). If we decide that it is better to load edges eagerly when scanning the object, we may want to enqueue the edge address together with the value it holds. If that's the case, there will be no space advantage to enqueue slices because we need to enqueue values, too. But there may be a temporal advantage. If we know that consecutive edges in a ProcessEdgesWork work packet are loaded sequentially from an array, we may take advantage of it and do prefetching more efficiently.
The text was updated successfully, but these errors were encountered: