optimize indexes using primitive types
better memory use 15% speed improvement