Write string to File in Kotlin (JVM)

Typically under 0.1 milliseconds to a write string that is less than 10,000 characters on JVM.

Benchmark data

Command to reproduce:

gt.sandbox.checkout.commit 89308d1589a1e4c77e57 \
&& cd "${GT_SANDBOX_REPO}" \
&& cmd.run.announce "./gradlew run --quiet"

Recorded output of command:

Benchmark: Write a string of [500] characters to file (Kotiln/Jvm)

Metric(micros)(millis)
Min290.029
P50 (Median)550.055
P90570.057
P95590.059
P99640.064
P99.91190.119
Max2590.259
Total1,108,2991108.299
Iterations20,000

Benchmark: Write a string of [1000] characters to file (Kotiln/Jvm)

Metric(micros)(millis)
Min310.031
P50 (Median)540.054
P90570.057
P95580.058
P99610.061
P99.91020.102
Max2,0502.050
Total1,083,7021083.702
Iterations20,000

Benchmark: Write a string of [2000] characters to file (Kotiln/Jvm)

Metric(micros)(millis)
Min310.031
P50 (Median)480.048
P90510.051
P95540.054
P99670.067
P99.91210.121
Max3,9563.956
Total979,929979.929
Iterations20,000

Benchmark: Write a string of [10000] characters to file (Kotiln/Jvm)

Metric(micros)(millis)
Min340.034
P50 (Median)620.062
P90650.065
P95680.068
P99760.076
P99.91020.102
Max8210.821
Total1,251,5251251.525
Iterations20,000

Backlinks