I've noticed that java will optimize out code that does nothing. That may
be apparent to the JIT with the pojo loop

      for (long i = 0; i < iterations; i++) {
        myInstance.getMemberStringValue();
      }

but not apparent with the deeper path thru the JCas/CAS code. Are you sure
something like that is not happening here?

That being said, the UIMA CAS design was strongly based on two principals:
1) to separate access APIs from the implementation, and 2) to enable
standardized and high performance CAS serialization methods between
analytics running in different Java versions and in non-Java platforms.
Both principals incur CAS access performance penalties.

Reply via email to