JMH iterations slow
Millies, Sebastian
Sebastian.Millies at softwareag.com
Thu May 15 10:51:16 UTC 2014
Hello there,
I am new to jmh. In my first try at using it, I have benchmarked creating and zipping an XML representation
of some object. I am using Java with the jmh version 0.7.1 from Maven Central.
There are 10 warm-up iterations and a hundred measurements, forking 1 process. The whole thing takes
more than a minute to complete, basically a second per iteration, whereas each single operation (at least
according to jmh) uses only about 22 microseconds.
Why are the iterations so slow? Looping inside the measurement method is actively discouraged,
because of JIT optimizations. Are there other ways to speed things up? What if I ever want to run
a million iterations?
Best,
Sebastian
PS: I’d like a verbosity mode that only gives me the configuration info, result and benchmark, but does not log
each iteration, i. e. something between NORMAL and completely SILENT, again with a view to having many
iterations.
Sebastian Millies
Expert Java Business Analytics
Phone: +49 681 210 3221 | Fax: +49 681 210 1801 | Sebastian.Millies at softwareag.com<mailto:Sebastian.Millies at ids-scheer.com>
Software AG – Sitz/Registered office: Uhlandstraße 12, 64297 Darmstadt, Germany – Registergericht/Commercial register: Darmstadt HRB 1562 - Vorstand/Management Board: Karl-Heinz Streibich (Vorsitzender/Chairman), Dr. Wolfram Jost, Arnd Zinnhardt; - Aufsichtsratsvorsitzender/Chairman of the Supervisory Board: Dr. Andreas Bereczky - http://www.softwareag.com
More information about the jmh-dev
mailing list