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

Isn't base and offset redundant? #12

Open
ancapdev opened this issue Mar 4, 2020 · 0 comments
Open

Isn't base and offset redundant? #12

ancapdev opened this issue Mar 4, 2020 · 0 comments

Comments

@ancapdev
Copy link

ancapdev commented Mar 4, 2020

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
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