Skip to content

Commit

Permalink
Avoid package validation in speedy compilation benchmark. (#11927)
Browse files Browse the repository at this point in the history
changelog_begin
changelog_end
  • Loading branch information
nickchapman-da authored Nov 30, 2021
1 parent 16135e6 commit 16a41f7
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import com.daml.lf.archive.Dar
import com.daml.lf.data.Ref.PackageId
import com.daml.lf.language.Ast.Package
import com.daml.lf.language.PackageInterface
import com.daml.lf.speedy
import com.daml.lf.speedy.Compiler.{compilePackages, Config, NoPackageValidation}
import java.io.File
import org.openjdk.jmh.annotations.{Param, Setup, Level, Benchmark, State, Scope}

Expand Down Expand Up @@ -38,8 +38,8 @@ class SpeedyCompilation {

@Benchmark
def bench(): Unit = {
val config = speedy.Compiler.Config.Default
val res = speedy.Compiler.compilePackages(interface, darMap, config)
val config = Config.Default.copy(packageValidation = NoPackageValidation)
val res = compilePackages(interface, darMap, config)
assert(res.isRight)
}
}

0 comments on commit 16a41f7

Please sign in to comment.