[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: 云风 Cloud Wu <cloudwu@...>
- Date: Fri, 14 Jun 2019 18:15:43 +0800
重归混沌 <findstrx@gmail.com> 于2019年6月14日周五 下午2:33写道:
> `
> #define setobj(L,obj1,obj2) \
> - { TValue *io1=(obj1); *io1 = *(obj2); \
> + { TValue *io1=(obj1); const TValue *io2=(obj2); \
> + io1->value_ = io2->value_; io1->tt_ = io2->tt_; \
> (void)L; checkliveness(L,io1); }
>
> `
>
> I disassembled this change, and can't find the key point.
>
> So, who can't point me the key? Thank you very much.
Because the sizeof(TValue) is 16 bytes on 64 bit platform, but
sizeof(obj->value_) + sizeof(obj->tt_) is 9 bytes.
--
http://blog.codingnow.com