lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


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