mirror of
https://github.com/zeux/pugixml.git
synced 2024-12-26 12:41:06 +08:00
Avoid store-load penalty on cursor->parent
This reclaims the performance lost in PCDATA reorganization and gains a little more on top of that.
This commit is contained in:
parent
dfb2b7f7b4
commit
58616a29aa
@ -3503,12 +3503,13 @@ PUGI_IMPL_NS_BEGIN
|
||||
}
|
||||
else
|
||||
{
|
||||
xml_node_struct* prev_cursor = cursor;
|
||||
PUGI_IMPL_PUSHNODE(node_pcdata); // Append a new node on the tree.
|
||||
|
||||
cursor->value = parsed_pcdata; // Save the offset.
|
||||
merged = parsed_pcdata; // Used for parse_merge_pcdata above, cheaper to save unconditionally
|
||||
|
||||
PUGI_IMPL_POPNODE(); // Pop since this is a standalone.
|
||||
cursor = prev_cursor; // Pop since this is a standalone.
|
||||
}
|
||||
|
||||
if (!*s) break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user