more performance tuning
This commit is contained in:
parent
acb7c6b16f
commit
ea572ad47f
10 changed files with 357 additions and 165 deletions
|
|
@ -0,0 +1,33 @@
|
|||
package btools.expressions;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import btools.util.LruMapNode;
|
||||
|
||||
public final class CacheNode extends LruMapNode
|
||||
{
|
||||
int crc;
|
||||
byte[] ab;
|
||||
float[] vars;
|
||||
|
||||
@Override
|
||||
public int hashCode()
|
||||
{
|
||||
return crc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals( Object o )
|
||||
{
|
||||
CacheNode n = (CacheNode) o;
|
||||
if ( crc != n.crc )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if ( ab == null )
|
||||
{
|
||||
return true; // hack: null = crc match only
|
||||
}
|
||||
return Arrays.equals( ab, n.ab );
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue