From 7f83c41256835194b1a7029459fea33708643d7c Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Tue, 6 Nov 2018 20:13:09 +1100 Subject: [PATCH] align ThreadedRegexVM::Thread to permit fused copy optimization Aligning makes gcc able to copy a Thread object with a single 32bit mov instruction instead of two 16bits one. --- src/regex_impl.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/regex_impl.hh b/src/regex_impl.hh index 785de36f..b68ad5d9 100644 --- a/src/regex_impl.hh +++ b/src/regex_impl.hh @@ -286,7 +286,7 @@ private: --saves.refcount; }; - struct Thread + struct alignas(int32_t) Thread { int16_t inst; int16_t saves;