Skip to content

Commit

Permalink
decrease the initial size of long-hash-map (no change really) + notes…
Browse files Browse the repository at this point in the history
… on perf testing
  • Loading branch information
kares committed Nov 11, 2015
1 parent 0a80302 commit e0ca9f5
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,9 @@ public abstract class RubyToJavaInvoker<T extends JavaCallable> extends JavaMeth
if (varArgs != null /* && varargsMethods.size() > 0 */) {
varargsCallables = varArgs.toArray( createCallableArray(varArgs.size()) );
}

cache = new NonBlockingHashMapLong<>(8);
// NOTE: tested (4, false); with opt_for_space: false but does not
// seem to give the promised ~10% improvement in map's speed ...
cache = new NonBlockingHashMapLong<>(4, true); // 8 still uses MIN_SIZE_LOG == 4
}

this.javaCallable = callable;
Expand Down Expand Up @@ -521,4 +522,4 @@ private static class NullHashMapLong<V> extends NonBlockingHashMapLong<V> {

}

}
}

0 comments on commit e0ca9f5

Please sign in to comment.