lua-users home
lua-l archive

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


The complexity of implementation is limited to one C source file, and can still be portable.
But DoS attacks are a concern and we can prevent it significantly with a correct hash (the current implementation is not)

Le lun. 25 mai 2020 à 10:57, 云风 Cloud Wu <cloudwu@gmail.com> a écrit :
Andrea <andrea.l.vitali@gmail.com> 于2020年5月22日周五 下午11:22写道:

> Handling very short string as Lua handles int64/doubles not only makes the code faster, but also reduces the pressure on the garbage collector.

I doubt it can reduce the pressure of the garbage collector, because
of short string interning.

Maybe we could only use very short strings and long strings , and
remove short string interning.  11/15 chars is enough for short
strings.
So that we can reduce the complexity of the implementation.

--
http://blog.codingnow.com