From 2cfa5e79fa52bf2f1b2e12f2490d8024cd7b3e2b Mon Sep 17 00:00:00 2001 From: Tim Wojtulewicz Date: Mon, 28 Jul 2025 08:49:38 -0700 Subject: [PATCH] Reduce the size of Func::Body quite a bit with some extra packing --- src/Func.cc | 2 +- src/Func.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Func.cc b/src/Func.cc index 75d604a560..b0d1889282 100644 --- a/src/Func.cc +++ b/src/Func.cc @@ -564,7 +564,7 @@ void ScriptFunc::AddBody(StmtPtr new_body, const std::vector& new_inits, Body b; b.stmts = new_body; - b.groups = groups; + b.groups = {groups.begin(), groups.end()}; current_body = new_body; current_priority = b.priority = priority; diff --git a/src/Func.h b/src/Func.h index 37e1538fa2..4476935d2a 100644 --- a/src/Func.h +++ b/src/Func.h @@ -2,6 +2,7 @@ #pragma once +#include #include #include #include @@ -66,8 +67,8 @@ public: struct Body { detail::StmtPtr stmts; + std::forward_list groups; int priority; - std::set groups; // If any of the groups are disabled, this body is disabled. // The disabled field is updated from EventGroup instances. bool disabled = false;