Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove External Zero concept #120

Open
Konard opened this issue Jul 5, 2022 · 1 comment
Open

Remove External Zero concept #120

Konard opened this issue Jul 5, 2022 · 1 comment

Comments

@Konard
Copy link
Member

Konard commented Jul 5, 2022

This branch will no longer exist:

if (_equalityComparer.Equals(value, default) && isExternal)
{
Value = ExternalZero;
}
else
{

No ExternalZero constant anymore:
public static readonly TLinkAddress ExternalZero = _uInt64ToAddressConverter.Convert(HalfOfNumberValuesRange + 1UL);

Regular (internal) zero becomes external.

Pros:

  • Bitwise operations safety
  • Better performance with conversion of raw numbers
  • Zeros in memory managers are now searchable

Cons:

  • Worse performance of memory managers (additional if branches for zero and indexing of zero values)
  • Huge change across the codebase
@Konard
Copy link
Member Author

Konard commented Jul 20, 2022

There is a blocker for this issue, at the moment when we start to index zeros we no longer will have multiple links with source and target set to zero, due to limitation of uniqueness.

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

No branches or pull requests

1 participant