[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [Experiment] Module system based on static hashing
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Thu, 9 Apr 2020 10:09:04 -0300
> I've conducted an experiment to speed up Lua state creation with static
> hash tables generated by GNU gperf and got some interesting results.
Your solution seems to require some manual editing of luaopen_*
functions. Your lx_open function in each module contains some of the
code from the luaopen function plus sometimes inside information, such
as replicating some of what luaL_newmetatable does (as in
complex/module.c). I wonder whether this can be avoided with some help
from the module writer. Perhaps we need an extension of luaL_Reg to
contain data types. Any thoughts?