mdedetrich / scalajson

ScalaJSON - JSON for Scala, currently contains minimal AST
BSD 3-Clause "New" or "Revised" License
55 stars 10 forks source link

Performance improvement for toJsAny #48

Closed mdedetrich closed 6 years ago

mdedetrich commented 6 years ago

This version of .toJsAny should be faster since we just mutate an array in place rather than creating a new array and putting elements onto it. Still need to verify this with some benchmarking.

Note that .asInstanceOf casts in Scala.js are always free

codecov-io commented 6 years ago

Codecov Report

Merging #48 into master will not change coverage. The diff coverage is 0%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #48   +/-   ##
=======================================
  Coverage   16.12%   16.12%           
=======================================
  Files           5        5           
  Lines         806      806           
  Branches      241      237    -4     
=======================================
  Hits          130      130           
  Misses        676      676
Impacted Files Coverage Δ
...s/src/main/scala/scalajson/ast/unsafe/JValue.scala 0% <0%> (ø) :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 7aedbf2...a05b3c7. Read the comment docs.

mdedetrich commented 6 years ago

Closing PR, this is pointless and doesn't get anywhere