Make palindrom computation faster.