uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thilo Goetz <twgo...@gmx.de>
Subject Re: A possible core speedup
Date Wed, 01 Oct 2008 16:23:52 GMT
I was half way through writing a reply when my email client
crashed.  Oh well.  Here's the abbreviated version.  There's
nothing wrong with this in principle, just check the comments
on CASImpl.setupTSDefault().  Make sure that the constants
actually correspond to the order in which types are created.

Also check the TYPE_CLASS constants.  They may actually have
the correct values for the built-in types, not sure.

I doubt you'll get a big speed-up out of this, though.  Let
us know what you find.


Marshall Schor wrote:
> I'm not sure this would speed anything up - but just in case:
> While doing some profiling, it appears that some time is spent (during
> deserializing) in CasImpl's ll_getTypeClass.  This code is a big switch
> statement written as a series of "if" statements, testing the current
> typeSystemImpl instance's set of values for primitive type codes.
> Switch can't be used here because the "case" values must be constants. 
> I think all the built-in type codes are constant - but the
> implementation seems to be allowing them to change (they're referenced
> from the TypeSystemImpl instance, as non-final values). 
> Using constants would probably speed up this function quite a bit.  Any
> reasons anyone sees we couldn't/shouldn't change this to use constants?
> -Marshall

View raw message