Skip to content

Commit

Permalink
Added benchmarks to documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Jul 3, 2014
1 parent ea7a32a commit fbc3479
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,31 @@ Tokenize a given sentence into words, white space, and punctionation.
## Browser Support
Pretty much every browser (available through browserstack) runs all parse-english unit tests.

## Benchmark

Run the benchmark yourself:

```sh
$ npm run benchmark
```

On a MacBook Air, it parser about 6 large books, 104 big articles, or 10,089 paragraphs per second.

```
parser.tokenizeSentence(source);
40,675 op/s » A sentence (20 words)
parser.tokenizeParagraph(source);
41,542 op/s » A sentence (20 words)
9,467 op/s » A paragraph (5 sentences, 100 words)
parser.tokenizeRoot(source);
10,089 op/s » A paragraph (5 sentences, 100 words)
986 op/s » A section (10 paragraphs, 50 sentences, 1,000 words)
104 op/s » An article (100 paragraphs, 500 sentences, 10,000 words)
6 op/s » A (large) book (1,000 paragraphs, 5,000 sentences, 100,000 words)
```

## Related

* [retext](https://github.com/wooorm/retext "Retext")
Expand Down

0 comments on commit fbc3479

Please sign in to comment.