HashSet equivalent for Job System

Hi there,

Is there HashSet implementation for Job System? Or should i use HashMap (int,bool) for that or something more efficient?

Thanks

Just use HashMap<int, EmptyStruct>

edit:

For clarity, NativeHashMap<int, EmptyStruct>

Maybe you can use NativeHashMap ?

1 Like

struct EMTPY_PLACEHOLDER{

}

Is using emptystruct more efficient than boolean?

Thanks

A bool is one byte, an empty struct is zero bytes so I don’t see why not.

empty struct is actually one byte

2 Likes