tolmasky/language — Issue #18: Slow parse times
Author: ide
Created: 2012-02-04 23:15:59+00:00
State: open

I haven't done any profiling so this is a rather generic issue, but the parser performance is rather slow. For example:

```javascript
> function benchmark() {
... var jquery = require('fs').readFileSync('./jquery-1.7.1.js', 'utf-8');
... console.time('parse');
... parser.parse(jquery);
... console.timeEnd('parse');
... }
> benchmark()
parse: 12042ms
```

I'm surprised because the theoretical performance should be quite high so I'm guessing that high number of object allocations, especially for the deep expression productions (how many nodes does it take to represent a simple string literal?) is hurting performance.