From 339ff2ec22a3844f1de36e5d15131c50c1cfda5a Mon Sep 17 00:00:00 2001 From: Michael Birch Date: Thu, 29 Jul 2021 13:54:11 +0000 Subject: [PATCH] Add options to bench profile --- Cargo.toml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 38f747b21..a21125540 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,6 +27,7 @@ codegen-units = 1 rpath = false [profile.dev] +# Due to a strange bug, setting this to 3 will cause test failures opt-level = "z" debug = false debug-assertions = true @@ -37,6 +38,12 @@ incremental = false codegen-units = 1 rpath = false +[profile.bench] +# lto must be enabled in the bench profile as well for +# it to actually happen when running tests with --release +lto = true +opt-level = 3 + [dependencies] blake2 = { git = "https://github.com/near/near-blake2.git", version = "0.9.1", default-features = false } borsh = { version = "0.8.2", default-features = false }