Closed htmldoug closed 7 years ago
Merging #26 into master will increase coverage by
0.15%
. The diff coverage is66.66%
.
@@ Coverage Diff @@
## master #26 +/- ##
==========================================
+ Coverage 44.64% 44.79% +0.15%
==========================================
Files 5 5
Lines 663 663
Branches 140 140
==========================================
+ Hits 296 297 +1
+ Misses 367 366 -1
Impacted Files | Coverage Δ | |
---|---|---|
...s/src/main/scala/scalajson/ast/unsafe/JValue.scala | 0% <0%> (ø) |
:arrow_up: |
...m/src/main/scala/scalajson/ast/unsafe/JValue.scala | 60.64% <100%> (ø) |
:arrow_up: |
jvm/src/main/scala/scalajson/ast/JValue.scala | 73% <100%> (+1%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update d863974...3a323b3. Read the comment docs.
This is a more aggressive version of https://github.com/mdedetrich/scalajson/pull/25.
Summary
I was curious about the cost of
Array[Char].mkString
vsnew String(Array[Char])
, so I benchmarked them.Using the String constructor directly is roughly 3x faster.
Results
Greatest benefit was seen for small strings, which I'd expect to be the common case for json processing.
Benchmark
This project uses scalameter, but jmh is what I know. Here's the benchmark.