From 547fc40dbe47a5fe4fb8df7786a6ac75494344f4 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Mon, 16 Oct 2023 15:20:42 -0400 Subject: [PATCH] No measurable performance improvement with native builds over LTO release builds. Leaving the code for this commented out because it involved an unstable cargo feature without showing any benefit. I would like to revisit this later. --- Cargo.toml | 9 +++++++++ src/parser/element_parser.rs | 1 - 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index e2cdbb2..c79417c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,3 +1,5 @@ +# cargo-features = ["profile-rustflags"] + [package] name = "organic" version = "0.1.10" @@ -64,6 +66,13 @@ inherits = "release" lto = true strip = "symbols" +# Optimized build for local execution. +# [profile.native] +# inherits = "release" +# lto = true +# strip = "symbols" +# rustflags = ["-C", "target-cpu=native"] + # Profile for performance testing with the "perf" tool. Notably keeps debug enabled and does not strip symbols to make reading the perf output easier. [profile.perf] inherits = "release" diff --git a/src/parser/element_parser.rs b/src/parser/element_parser.rs index 4e0f396..c553e34 100644 --- a/src/parser/element_parser.rs +++ b/src/parser/element_parser.rs @@ -1,4 +1,3 @@ - use nom::multi::many0; use super::babel_call::babel_call;