Skip to main content
1 of 4
MrSmith42
  • 1k
  • 7
  • 13

I would use a boolean[65536] which flags if the character has to be escaped. I am quite confident that this is faster than the switch.

But only profiling can show if it is really faster.

MrSmith42
  • 1k
  • 7
  • 13