finite automata and L1 and L2 cache misses
andrew_nuss at yahoo.com
Mon Sep 17 22:34:22 UTC 2012
My application creates and executes big finite automata, which are so costly to construct that it is worth caching them for reuse. Thus they are likely to persist thru gc cycles.
My automata consist of arrays of ints, arrays of objects, and various small objects of different class types. What strategies can I take to ensure that these are co-located on the heap to avoid L1/L2 cache misses during automata execution? If I succeed in this, how can I be confident that they will still be co-located AFTER gc compaction?
One idea is to have the cache hold a wrapper object rather than the graph reference itself. The wrapper object would hold references to all the individual components of the graph, as well as the graph. Would this help the gc cycle continue to co-locate the element objects of the graph?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the hotspot-gc-dev