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

Subarrays or arrays? #131

Open
henry2004y opened this issue Jan 23, 2023 · 0 comments
Open

Subarrays or arrays? #131

henry2004y opened this issue Jan 23, 2023 · 0 comments

Comments

@henry2004y
Copy link
Owner

In readvariable,

@inbounds v = ndims(raw) == 1 ? raw[meta.cellindex] : raw[:,meta.cellindex]

making it a view would save about half the memory usage and result in 2~7 times faster in reading EGI outputs. The downside, however, is that the new return arrays are now subarrays instead of regular arrays. Is it worth it?

The speedup is not obvious for thousand of cells, e.g., in bulk.2d.vlsv.

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