title: Javascript: what's the point of RegExp.compile()?
body: <p>I've got a situation where I want to get a regexp from the user and run it against a few thousand input strings. In the manual I found that the <code>RegExp</code> object has a <code>.compile()</code> method which is used to speed things up ins such cases. But why do I have to pass the regexp string to it again if I already passed them in the constructor? Perhaps constructor does the <code>compile()</code> itself?</p>