Skip to content

Runtime overhead #22

@MasonProtter

Description

@MasonProtter

There appears to be some runtime overhead from using this package, it's not especially onerous, but it's definitely present:

julia> using WhereTraits, BenchmarkTools

julia> @traits f(x) = x

julia> @btime f(1);
  22.215 ns (0 allocations: 0 bytes)

compare against

julia> g(x) = x;

julia> @btime g(1);
  1.356 ns (0 allocations: 0 bytes)

Doing some inspection, I think this is due to the conflict resolution system which should be resolved at compile time instead of runtime. Is there anything we can do about this?

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