Skip to content

Commit

Permalink
update benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
erikerlandson committed Apr 20, 2024
1 parent 277f28d commit 196828e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions benchmarks/src/main/scala/coulomb/benchmarks/quantity.scala
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ class QuantityBenchmark:
import coulomb.testing.units.{*, given}
import algebra.instances.all.given

import coulomb.policy.standard.given

var data: Vector[Quantity[Double, Meter]] =
Vector.empty[Quantity[Double, Meter]]

Expand All @@ -65,7 +63,7 @@ class QuantityBenchmark:

@Benchmark
def add1V1U_opt(): Quantity[Double, Meter] =
// import coulomb.ops.standard.optimizations.all.given
import coulomb.benchmarks.algebras.given
data.foldLeft(0d.withUnit[Meter]) { (s, x) => s + x }

@Benchmark
Expand All @@ -74,5 +72,5 @@ class QuantityBenchmark:

@Benchmark
def add1V2U_opt(): Quantity[Double, Kilo * Meter] =
// import coulomb.ops.standard.optimizations.all.given
import coulomb.benchmarks.algebras.given
data.foldLeft(0d.withUnit[Kilo * Meter]) { (s, x) => s + x }

0 comments on commit 196828e

Please sign in to comment.