Duels under Tokugawa were forbidden and punishable by death of both opponents. The only fighting that samurai could see was terrorizing of unarmed peasants.
Samurai were not warriors in European sense but more of a mob enforcers. Good for terrorizing peasants not really fit for fighting in any military sense.
During Meiji when peasants got professional military training and leadership samurai became toothless.
Mostly using arrows not swords. But yumi is inferior weapon compared to reflexive bow used by Chinese, Korean, Mongol or Turkic soldiers.
Also if you look at any Japanese castle (Himeji had been well preserved by US Bomber Command for navigational purposes) you will quickly realize that any continental army will take at most a week to dry it's moats and dig mines under it's wall. Fortunately Japan never had seen invading army on its soil.
This samurai / bushido hype is so much out of proportion and simply untrue.
While in the same time real history of Asia is full of military class of exceptional value. Indian Rajput, Islamic Gunpowder Empires, Malays, Mongols - to name just a few
I am not going to compare medieval continental technology to medieval Japan because that would be against the spirit of comparison. Japan was pretty closed society even when they traded with the continent. While it is true that the continent saw cutting edge tech in terms of unbalanced battle situations, we can surely appreciate the Japanese stuff for it's aesthetic vibe.
If Japan was suddenly in the continent, I am sure they would have to compete and modify their war society like the rest did. But the root aesthetics would be the same.