I don't have any problem, just helping OP.
I was mainly showing how to use $hfind to efficiently do a badwords system which works for expression in general and not just words, which is not limited, for example if he wants to specifically ban the word "tést" without banning "tèst" he can very easily to that by just adding directly "tést" to the table without using /addbadword
Your solution is very limited in that aspect, if you start replacing, then it is impossible to ban specific word like tést.
Also, in this context of twitch chat, people talk from everywhere on the planet, you'll extremely often have characters outside ascii appearing, yet you'll often not have any replacement to make, but your code is going to parse that $replacex everytime nonetheless, for nothing, you call it fast but it would be much faster to include what you want to replace directly in the pattern, and maintaining such a script by hardcoding stuff, well it's possible, theorically faster but in practice it's a pain, especially to know what you have already for which letter, especially for a beginner.
And if you want to handle specific expressions prior replacing then you're doing some kind of combination of two methods, maybe that's not best/faster.