Commit cfed4ac5 authored by Jamie A. Jennings's avatar Jamie A. Jennings

Edits

parent 3f702ca4
Pipeline #51280870 passed with stage
in 1 minute and 13 seconds
......@@ -59,7 +59,7 @@ place it in double quotes, like string literals in other programs.)
* A superset of regular expressions, i.e. more powerful
* Allows recursive grammars, so RPL can recognize recursively defined
structures like [JSON](rpl/json.rpl)
* This formalism is an elegant alternative to the ad hoc
* The PEG formalism is an elegant alternative to the ad hoc
extensions to regular expressions found in most "regex" libraries
* Supports linear run-time (in the input size) for common use cases
......
## Performance
- Reasonably small:
* The Rosie compiler/runtime/libraries take up less than 2MB on disk
<!-- du -ch /usr/local/lib/librosie.a /usr/local/bin/rosie /usr/local/lib/rosie/lib /usr/local/lib/rosie/rpl -->
* Memory usage by the CLI is currently excessive, but this [will improve](Memory consumption) soon
* The Rosie compiler/runtime/libraries take up less than 2MB on disk <!--
du -ch /usr/local/lib/librosie.a /usr/local/bin/rosie /usr/local/lib/rosie/lib /usr/local/lib/rosie/rpl
-->
* Memory usage by the CLI is currently excessive, but this [will improve](#Memory-consumption) soon
- Good performance:
* faster than [Grok](https://www.elastic.co/guide/en/logstash/current/plugins-filters-grok.html)
(by a factor of 4 or more)
......@@ -21,6 +22,8 @@ A measurement we use in regression testing for performance is how long it takes
to process 1 million syslog entries using the pattern `syslog` as defined here:
```
-- syslog.rpl
import date, time, net, word, num
~ = [:space:]+
......@@ -58,7 +61,9 @@ test mentioned above, generating JSON output. This rate, about 110k lines/sec,
suggests that current Rosie CLI has significant unnecessary overhead.
We hypothesize that much of the memory and speed overhead of the current CLI
derives from the file processing loop, which is written in Lua. And Lua interns
strings. The `match.c` prototype does the same work, but is written in pure C.
derives from the file processing loop, which is written in Lua. And Lua
[interns strings](https://en.wikipedia.org/wiki/String_interning). The `match.c`
prototype does the same work, reading input line by line and matching against a
compiled pattern, but it is written in pure C.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment