[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: 'setobj' in lua-5.4.0-alpha-rc2 become more faster
- From: Javier Guerra Giraldez <javier@...>
- Date: Fri, 14 Jun 2019 16:01:50 +0100
On Fri, 14 Jun 2019 at 11:16, 云风 Cloud Wu <cloudwu@gmail.com> wrote:
>
> Because the sizeof(TValue) is 16 bytes on 64 bit platform, but
> sizeof(obj->value_) + sizeof(obj->tt_) is 9 bytes.
i'd also guess that copying the struct uses memcpy(), while the couple
of assignments might be optimised for the common case where the values
are already in some register. even if memcpy() is frequently inlined,
it might need to flush down any value to memory before copying.
--
Javier