[Tarantool-patches] [PATCH luajit 1/2] Add support for full-range 64 bit lightuserdata.

Igor Munkin imun at tarantool.org
Mon Aug 2 18:42:13 MSK 2021


Sergos,

On 02.08.21, Sergey Kaplun wrote:
> Hi, Sergos!
> 

<snipped>

> > 
> > Can’t help to laugh at Mike’s /* Fast path */, brilliant isn’t it?
> > Perhaps addition of a new segment is not so often - and is counted to 256 -
> > so we can easily sort the array each time to make it log(n) rather (n) for
> > each lua_pushlightuserdata()?
> 
> Mike's style... Also, I suggest to avoid sorting optimization for now by
> two reasons:
> 
> 1) We have no goal to beat everyone at ARM __yet__. Just make it
> breathing.
> 2) We have no performance tests to measure such changes (I hope
> __yet__, too).

And what is more important, this is impossible, AFAICS. The segment *id*
is returned to "userspace", so you can't just reorder the segments
without LUD values to be updated. The issue becomes impossible since
particular LUD value can't be obtained within Lua internal world. Hence
this is the *fastest* path for the current solution. Anyway, nobody can
stop us to improve it ;)

> 

<snipped>

> 
> -- 
> Best regards,
> Sergey Kaplun

-- 
Best regards,
IM


More information about the Tarantool-patches mailing list