In my project there are some \'Prototype\' factories that create instances by cloning a final private instance.
The author of those factories says that this pattern prov
My tests with DecimalFormat (OpenJDK 8/Windows/JMH 1.19) shows completely opposite image:
Benchmark Mode Cnt Score Error Units
Format.everyTimeCreate avgt 10 9326.967 ± 199.511 us/op
Format.useClone avgt 10 5102.397 ± 72.993 us/op
Format.useGlobalWithTL avgt 10 4605.604 ± 59.000 us/op
Looks like it is not so simple to answer what is perform better.