xml2
xml2 copied to clipboard
Use cpp11
- how to deal with
memcpy()? - is the performance hit of the string handling relevant?
xml2_node.cppcan be tackled after #400 is merged.
@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().