Optimized isunique.

Now running genlist(10,4) takes less than 0.1 sec.
Removed @base.