title: Performance of string functions in javascript on dynjs vs. node
body: <p>I have a pegjs generated parser that is parsing a dust template of 29kb size.  I am trying to execute parsing on this template using nodyn, which in turn, is on dynjs, which in turn is on vertx and that is on the JVM.  </p>
  
  <p>When parsing executes on node, it executes in a matter of milliseconds (~200 ms).  However when I run the parse on the nodyn/dynjs/vertx/jvm stack, I am getting performance of somewhere between 800 ms per character~!</p>
  
  <p>The problematic functions appear to be the charCodeAt function calls as well as substr calls.  The generated parser makes copious calls to both methods and each method can take (it's not always consistent) up to 100 ms to execute.</p>
  
  <p>Can anyone explain why that might be the case?  and even better, can anyone provide a solution?</p>
  
  <p>Thank you~!</p>