refactor: small perf win by eliminating string object keys
This commit is contained in:
parent
db60c32d93
commit
4a4e0f4013
12 changed files with 151 additions and 111 deletions
|
|
@ -1,10 +1,13 @@
|
|||
local M = {}
|
||||
|
||||
M.FIELD = {
|
||||
id = 1,
|
||||
name = 2,
|
||||
type = 3,
|
||||
meta = 4,
|
||||
}
|
||||
---Store entries as a list-like table for maximum space efficiency and retrieval speed.
|
||||
---We use the constants below to index into the table.
|
||||
---@alias oil.InternalEntry any[]
|
||||
|
||||
-- Indexes into oil.InternalEntry
|
||||
M.FIELD_ID = 1
|
||||
M.FIELD_NAME = 2
|
||||
M.FIELD_TYPE = 3
|
||||
M.FIELD_META = 4
|
||||
|
||||
return M
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue