How quickly does it take to check if an element is part of an array?

Option 1:

We can use inside to check if some element is part of an array, without having to go through each element in the array.

Example:

Option 2:

We can also use inside to check if some variable has allowed values.

Example: