Inlined some functions (compiler probably did this anyways) Use bool array instead of char array (speeds up neighbor calculation) Manually handle x=0 and x=size_x-1 because this prevents a lot of if-checks