Skip to content

Remove External Zero concept #120

Description

@konard

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

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions