From b552657926eeac37de24fae5684b1f758fc23f72 Mon Sep 17 00:00:00 2001 From: Alex Pasmantier <47638216+alexpasmantier@users.noreply.github.com> Date: Tue, 31 Dec 2024 00:46:13 +0100 Subject: [PATCH] perf(bin): compile binary as a single code unit and use fat LTO (#191) Fixes #185 > Release + codegen-units = 1: 11 Mib Release + Thin LTO (current default): 14 Mib Release + Fat LTO: 11 Mib Release + codegen-units = 1 + Fat LTO: 9.7 Mib Release + codegen-units = 1 + Thin LTO: 11 Mib --- Cargo.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 871d0db..b3f9fb0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -117,7 +117,8 @@ debug = true [profile.release] -lto = "thin" +codegen-units = 1 +lto = "fat" [profile.deb] inherits = "release"