some microtuning
This commit is contained in:
parent
d963814d78
commit
2213d4f7fc
9 changed files with 278 additions and 149 deletions
|
|
@ -502,7 +502,7 @@ public final class MicroCache2 extends MicroCache
|
|||
}
|
||||
if ( pass == 3 )
|
||||
{
|
||||
return bc.getEncodedLength();
|
||||
return bc.closeAndGetEncodedLength();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ public final class TagValueCoder
|
|||
}
|
||||
|
||||
byte[] res;
|
||||
int len = ctx.getEncodedLength();
|
||||
int len = ctx.closeAndGetEncodedLength();
|
||||
if ( validator == null )
|
||||
{
|
||||
res = new byte[len];
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ public class StatCoderContextTest
|
|||
ctx.encodeNoisyNumber( i, noisybits );
|
||||
}
|
||||
}
|
||||
ctx.closeAndGetEncodedLength();
|
||||
ctx = new StatCoderContext( ab );
|
||||
|
||||
for ( int noisybits = 1; noisybits < 12; noisybits++ )
|
||||
|
|
@ -47,6 +48,7 @@ public class StatCoderContextTest
|
|||
ctx.encodeNoisyDiff( i, noisybits );
|
||||
}
|
||||
}
|
||||
ctx.closeAndGetEncodedLength();
|
||||
ctx = new StatCoderContext( ab );
|
||||
|
||||
for ( int noisybits = 0; noisybits < 12; noisybits++ )
|
||||
|
|
@ -74,6 +76,7 @@ public class StatCoderContextTest
|
|||
ctx.encodePredictedValue( value, predictor );
|
||||
}
|
||||
}
|
||||
ctx.closeAndGetEncodedLength();
|
||||
ctx = new StatCoderContext( ab );
|
||||
|
||||
for ( int value = -100; value < 100; value += 5 )
|
||||
|
|
@ -111,6 +114,7 @@ public class StatCoderContextTest
|
|||
StatCoderContext ctx = new StatCoderContext( ab );
|
||||
ctx.encodeSortedArray( values, 0, size, 0x08000000, 0 );
|
||||
|
||||
ctx.closeAndGetEncodedLength();
|
||||
ctx = new StatCoderContext( ab );
|
||||
|
||||
int[] decodedValues = new int[size];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue