What is most low data type?

Hello, I want give to dictionary something low, I just want fast check if item exist without
“for _,value in pairs”, but idk what I should set. Maybe Table[“test”] = true or Table[“test”] = " ", but idk.

If the key returns nil then it doesn’t exist else it does exist.

I know, I just want store lowest value

The lowest value in Lua is

math.min -- This counts as a number btw.

So store that in your Datastore.

okay, thanks, btw maybe I can get bytes of data type or something like this to check size?

1 Like

If you just need to check if a key exists, setting the value to true should do the job. There’s no need for finding the smallest data type for “fastest” access speed. You should prioritize readability over micro optimization in most cases.

1 Like

Wow now my time to shine!

I did some extensive testing on which way to get a value of a table is faster and here are my results:

when there is a table with >75-150 (varies) values it is faster to directly index the table like this:

local Table = {
    ["Item1"] = true
}
Table["Item1"]

But if you need a much larger table with much larger data sets then using roblox table.find is the quickest!

Edit: If you’d like to see my full test results I have them saved!

1 Like

good to know, but table.find isn’t good way I think

Did you read my message at al?

sure I did.
3O characters…