When a regular expression is run JavaScript, is the regex engine that evaluates the expression compiled code? or the engine itself is written in javascript?
While doing some basic string matches tests, I found that a single regex is considerably faster than my JavaScript function that does the same thing, so I wondered why the regular expression was faster.
P.S: I'm totally new to regex.