Ticket Hash: | 0439ca1556eb8edc2069e417954c209e15fe9b4a | |||
Title: | use lua_createtable() when number of columns is known | |||
Status: | Closed | Type: | Feature_Request | |
Severity: | Minor | Priority: | Immediate | |
Subsystem: | Resolution: | Open | ||
Last Modified: | 2016-11-02 17:39:57 | |||
Version Found In: | ||||
User Comments: | ||||
anonymous added on 2016-05-02 08:42:51:
(text/x-fossil-plain)
Suggestion: use lua_createtable() when number of columns is known will improve performance. Avoids multiple reallocations of the table as the columns are added to the result table. Due to current use of lua_newtable(), for a1,a2,a3,a4,a5,a6,a7,a8 in stmt:urows() do local row = {a1,a2,a3,a4,a5,a6,a7,a8} end is significantly faster than for row in stmt:rows() do end e added on 2016-11-02 17:39:57: (text/x-fossil-plain) Egil, Good suggestion, thanks! This improvement [a56548c06d] will be in the next version. |