Hacker News new | ask | show | jobs
by PassTheAmmo 5809 days ago
Just keep them as BCD and add / xor them in parallel, as show here (under Packed BCD Arithmetic / addition): http://www.cs.uiowa.edu/~jones/bcd/bcd.html#packed

Then just keep track if at least one carry was generated instead of checking if the resulting number was a palindrome separately. Should be very fast.