It’s a good question. I think it depends on the persons situation. For me personally I would rather invest more than pay down the mortgage faster. That might change as I get older.
I think in the 30s or early 40s investing should be the priority, and towards the late 40s early 50s onwards, paying off mortgage debt should become a priority.