Skip to content

Conversation

@DrRataplan
Copy link
Contributor

This can improve performance because a map does not have to be copied a second time when returning
from XPath. It also makes the APIs easier to use because an entry in the map will be exactly the
same as the entry that was put in to engine as a variable.

This makes FontoXPath more predictable.

Relates to discussion #392

This can improve performance because a map does not have to be copied a second time when returning
from XPath. It also makes the APIs easier to use because an entry in the map will be exactly the
same as the entry that was put in to engine as a variable.

This makes FontoXPath more predictable
@DrRataplan DrRataplan force-pushed the map-array-reference-equality branch from 106b7f2 to 8516b44 Compare July 13, 2021 14:27
@DrRataplan
Copy link
Contributor Author

This is a draft PR. I am aware naming is inconsistent. However, @JosVerburg @bwrrp, I think this PR can open up a lot of doors in fontoxpath-indices: more reference equality is usually more better.

@bwrrp
Copy link
Member

bwrrp commented Jul 13, 2021

That's a lot of code changes, I'll try to take a look in more detail later.

Am I correct in assuming that the array / object will only retain reference equality as long as it has not been modified? Does that also apply to sub-values (e.g., a map stored in an array where the array is modified, but the map is not)? That could definitely be useful to prevent deep equality checks when using XQuery to manipulate such data!

@DrRataplan
Copy link
Contributor Author

DrRataplan commented Jul 13, 2021 via email

@DrRataplan
Copy link
Contributor Author

Seems like some part of the compiler is very cross with me indeed. Might be some of the any I removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants