int set_empty(void)
{
	return 0;
}

int set_size(int set)
{
	int size = 0;
	while (set)
	{
		size += set & 1;
		set >>= 1;
	}
	return size;
}

int set_add(int set, int element)
{
	return set | (1 << element);
}


int set_empty(void)
{
	return 0;
}

int set_size(int set)
{
	/* Bit-Twiddling Hacks */
	/* TODO: shall export to bits module to provide more robust solutions
	 * based on hardware capabilities (eg. popcount instruction) */
	set = set - ((set >> 1) & ~(unsigned int)0/3);
	set = (set & ~(unsigned int)0/15*3) + ((set >> 2) & ~(unsigned int)0/15*3);
	set = (set + (set >> 4)) & ~(unsigned int)0/255*15;
	return (set * (~(unsigned int)0/255)) >> (sizeof(int) - 1) * 8;
}

int set_add(int set, int element)
{
	return set | (1 << element);
}


Optimize counting size of larger sets
[SET] REFACTOR: Optimize counting size of larger sets
