Open mgirlich opened 1 year ago
@DavisVaughan I now also migrated xml2_node.cpp
to cpp11. But the performance hit from string handling really bites us now. It is nearly as slow as before replacing the S3 dispatch.
Is it one or two functions in particular?
I haven't looked into this in more detail but only checked xml_name()
(see the benchmark in https://github.com/r-lib/xml2/pull/400). The easiest would probably be to check and carefully revert some of the changes and then wrap things with cpp11::unwind_protect()
.
memcpy()
?xml2_node.cpp
can be tackled after #400 is merged.