Manual Swap

Currently, I have an opportunity to swap 6spd manual transmission in my 3.0. The options are to put 6spd manual from 2004 A4 3.0+diff or 6 spd manual and dif from b6 S4. Which setup would be better in terms of performance?

Also, if i want to leave the original ECU that was chipped by JHM, how can resolve the speed sensor problem?
My car is 2002 and the speed sensor is located at transmission. After 2003 the reading is taken from ABS. is there are any ways to reprogram my ECU, so i can avoid loosing JHM software?

Thanks for help