Introduction

Here are present actual charts for performance comparison of string formatting in Java/Scala for the corresponding post «Scala: String Interpolation Performance».

The legend for tests. «String length» is a length of a result string (after formatting).

Tests performed via JMH, 2 forks, 3 warmup runs and 7 iteration (3 seconds each). Ubuntu 16.04, linux-kernel 4.4.0-51-generic, JDK 1.8.0_91, scala library 2.12. The configuration of a hardware is Intel® Core™ i7–5600U CPU @ 2.60GHz × 4 (2 core + 2 HT) with 16 GB RAM.

Chart

avg - average, min - minimal, p50 - percentile 50 (median), p95 - percentile 95, p99 - percentile 99, max - maximum

Full JMH log is here.