On 07/08/2014 11:30 PM, Martin Buchholz wrote:
Benchmarks welcome.

I have run your latest webrev with the following benchamrk:

@State(Scope.Thread)
public class IHMBench {

    Map<Object, Object> map = new IdentityHashMap<Object, Object>();

    @Benchmark
    public void putNewObject(Blackhole bh) {
        Object o = new Object();
        bh.consume(map.put(o, o));
        if (map.size() > 100000) {
            map = new IdentityHashMap<Object, Object>();
        }
    }
}

Using:

java -Xmx4G -Xms4G -jar benchmarks.jar -f 0 -i 30 -wi 10 -t 1 -gc 1

...and results are:

Original:

Benchmark Mode Samples Score Score error Units
j.t.IHMBench.putNewObject    thrpt        30 13305370.384 80122.977    ops/s

Patched:

Benchmark Mode Samples Score Score error Units j.t.IHMBench.putNewObject thrpt 30 13364374.454 124491.206 ops/s


Seems performance is the same.

Regards, Peter

Reply via email to