HW3: Performance improvement

Fewer cudaMalloc() as they're the absolute performance killers