Skip to content

Isn't base and offset redundant? #12

@ancapdev

Description

@ancapdev

I guess in most cases these objects are short lived and maybe even some partially constant propagated if all inline, but couldn't you elide the offset field for a small performance gain? I.e., replace

struct Blob{T}
    base::Ptr{Nothing}
    offset::Int64
    limit::Int64
end

With

struct Blob{T}
    base::Ptr{Nothing}
    limit::Ptr{Nothing} # one past end of range
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions