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.
This commit is contained in:
Maxime Coste 2018-11-06 20:13:09 +11:00
parent 05a9eb62f4
commit 7f83c41256

View File

@ -286,7 +286,7 @@ private:
--saves.refcount;
};
struct Thread
struct alignas(int32_t) Thread
{
int16_t inst;
int16_t saves;