Why is @temp table performance some times worse than #temp table performance?
Table Variables don't have statisics in the same way as Temp Tables normally they're assumed to have only 1 row.  This incorrect estimate of rowcount will make a nested loop operation look like the best plan but when this is done for a larger amount of rows the cost can easier be greater than a table scan.