finite automata and L1 and L2 cache misses

Andy Nuss andrew_nuss at yahoo.com
Mon Sep 17 22:34:22 UTC 2012


Hi,

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?

Andy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/hotspot-gc-dev/attachments/20120917/4c679d9f/attachment.htm>


More information about the hotspot-gc-dev mailing list