My question is quite simple, I was wondering if there is a more efficient way in terms of performance to find whether a value exists inside a specified table without iterating through several keys. With my current knowledge, I would have to do something like this:
local function FindTableValue(Table, Value)
for _,v in pairs(Table) do
if v == Value then return true end
end
end
This is generally ok to use in many cases, but when tables start having 50+ values and I am running the finding function every frame, things can get quite slow performance wise. If this question has already been asked, I apologize as I was not able to find something similar here on the website.

2 comments
The research was quite interesting, not 100% what I was looking for but good enough. Thanks.
Of course Glad i can help in any way possible...that upvote button looks kind of juicy dont you think?