Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
The production for composite types in Boilerplater::Parser is inefficient,
because it builds a simple Type object before failing to match, and this Type
object is subsequently discarded when the parser backtracks. The simple Type
– which matched, on the way to failing to create a complete composite type –
now must be built up again.
By using the simple Type object rather than discarding it when the composite
type fails to match, we can speed up the parser by around 30%.
This patch also expands the test coverage for the parser, adding tests for
many lower level productions.