If I can choose between list of objects, lists of integers and dictionaries (is there any other data structure option?), which is the most efficient data structure to discover if a group is a subgroup of other group, and how to implement?

I have a class with unique integers atributes, so I can "represent" the class object's by the integer they contain, or the object (pointer) itself.

```
a.atributeEx = 1
b.atributeEx = 2
c.atributeEx = 3
listOfPointers = [a,b,c]
listAtributes = [1,2,3]
dictEx = ['1':1, '2':2, '3':3]
```

One option is to use issubset, as bellow:

```
listAtributes2 = [1,2]
set(listAtributes).issubset(listAtributes2)
```

However, using the issubset function with a list of atributes, my code would take months to years to finish to run, as this has to be performed billions of times. Usually, one list has from 1 to 4 elements while the other has from 200 to 2000 elements.

What is the best approach for this problem?

`set.issubset`

should be fairly efficient, maybe you picked the wrong language... or the wrong abstraction.`set(listAttributes) <= set(listAttributes2)`

should be fairly efficient and fast, certainly faster than anything else native Python has to offer. In what scenario would that take months to years?compare pointers? So that:`a = 1`

,`b = a`

,`set(a).issubset(b)`

would return`True`

, and`a = 1`

,`b = 1`

,`set(a).issubset(b)`

would return False?1more comment