Consider class = FALSE (optionally?) for TreeCursor. This would actually make quite a big difference, as avoiding the S3 method overhead does seem to help a lot (see #21). Maybe we could expose both TreeCursor and TreeCursorBare or something for the performance cases. The idea is that in a TreeCursor you are often iterating over an entire tree, which has many TreeCursor$ calls.
Optimize new_node() slightly since it is called by TreeCursor$node()
Optimize check_node() as much as we can since its called so often
Optimizing parser_reparse() internals, since it can be called a lot. Can we get out of the way with our error checking? Or move it to C?
class = FALSE
(optionally?) forTreeCursor
. This would actually make quite a big difference, as avoiding the S3 method overhead does seem to help a lot (see #21). Maybe we could expose bothTreeCursor
andTreeCursorBare
or something for the performance cases. The idea is that in aTreeCursor
you are often iterating over an entire tree, which has manyTreeCursor$
calls.new_node()
slightly since it is called byTreeCursor$node()
check_node()
as much as we can since its called so oftenparser_reparse()
internals, since it can be called a lot. Can we get out of the way with our error checking? Or move it to C?