Performance question: 4 versions of same sketch

You're doing lots of large bitshifts in the 64-bit version. On an 8-bit processor without many registers that isn't likely to optimise very well.