Hi Jawed,
I would recommend you not to use loops, instead use the Cross Joiner node (takes around 10 minutes for 20k x 5k rows on my machine) and after either a Rule Engine node to compare the records or a Math Formula node to calculate difference.
Please find attached a sample workflow.
Best,
Anna