I have only very limited experience, but matchlocks seem fantastic on castle defence. Samurai often break before getting up the ramparts.

More generally, someone at TWC did some testing of ranged weapons. It was rather like what I did with bow samurai vs bow ashigaru in the Confucian Academy but also including monks and matchlocks. Matchlocks came out top in terms of lethality (vs advancing melee infantry) iirc.