After the benchmarks I have a few questions,
- Why is the 64-bits version so much slower than the 32-bits version?
Most likely you're running in some scenario where the increased
footprint from 64bit pointers/longs hurts you (e.g. less efficient caching).
It's unlikely that a compiler change would help you much there;
gcc does not change data structures.
If there are tunables in MySQL that allow you to increase the available
memory for caching increasing them may help.
If that doesn't help I would just run the 32bit version on the 64bit kernel.