optimization part 1

mmap
int* instead of vector