I am not sure I understand your question.
You wrote a program on Vista and compiled it there. On Vista it works fine, but on XP its slower???
Am I understanding correctly???
Tell me, do both machine have the same amount of RAM memory?
Do both machine have the same (or equivalent speed)? Processor speed?