jond3k/yay — Issue #7: Benchmark
Author: jond3k
Created: 2011-11-13 23:47:58+00:00
State: open

This is going to be run on servers. For that reason we need to check that CPU usage wont be too high.

A quick test will be to repeatedly iterate over a bunch of books from project guttenberg, matching rules of varying complexity

* no matching of any kind: cat files > /dev/null
* yay, but not doing any matching: cat files | yay nothing > /dev/null
* yay, doing some matching: cat files | yay benchmark1 > /dev/null
* sed, doing some matching: cat files | sed TODO > /dev/null
* yay, matching lines: cat files | yay benchmark2 > /dev/null

etc.

Potential optimisations include rolling up multiple expressions with the same result in to one (ruby's Regexp has native support for this).