[jboss-dev-forums] [Design of AOP on JBoss (Aspects/JBoss)] - Re: Array interception needed for jboss cache

jason.greene@jboss.com do-not-reply at jboss.com
Fri Jan 12 02:59:03 EST 2007


This looks great, however, it might be a good idea to detect local array references that are never passed outside of a method body.

Consider something like the following:

  | { 
  |   long[] hi = new long[n];
  |   long f = 0, g = 1;
  |   for (int i = 0; i < n; f += g, g = f - g, i++) hi = f;
  | }
  | 

Detecting this as local would prevent N method invocations and N memory barriers (potential cpu cache flushes). This would be slightly complicated to detect, but worth it IMO.

-Jason



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4000733#4000733

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4000733



More information about the jboss-dev-forums mailing list