Benchmark Mode Samples Mean Mean error Units c.s.m.j.StringBuilderSize.expandingSize avgt 15 7566.477 374.611 ns/op c.s.m.j.StringBuilderSize.predefinedSize avgt 15 5640.386 133.672 ns/op
And here is the code for it. (I have also posted some other jmh-based benchmarks in that repo).