lua-users home
lua-l archive

Re: 'setobj' in lua-5.4.0-alpha-rc2 become more faster

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


On 2019年6月14日 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

AltStyle によって変換されたページ (->オリジナル) /