Skip to content

PERF: value types end up boxed #8

Description

@Therzok

Given S, D value types here, when doing a.Equals(b), they end up using the Equals(object) overload.

Maybe it would be good to have EqualityComparer<T>.Default.Equals(a, b) there?

I initially wanted to suggest having S:IEquatable<D>, D:IEquatable<S>, There's also the problem when one of S values is null, since a.Equals(b) would NRE. I know that having nulls is bad design, but better safe than sorry?

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions