Skip to content

Conversation

@DocOtak
Copy link
Contributor

@DocOtak DocOtak commented Jul 11, 2025

Uses some of the nice new "strings" functionality in numpy 2 to speed things up in the read_hex function.

In one of the largest hex files I could find in the r2r breakout examples, this change speeds up the reading of hex by about 2.2x (333ms vs 749ms), the slowest part is actually writing the file to disk.

I'm not sure if the strangeness of the "pure" numpy code is worth it though, really you'd only need to read the files once and just use the netCDF after.

Didn't write tests, but the existing ones pass. This PR doesn't need to be merged ever if we don't want it.

there are two str.join calls that might be python loops
@DocOtak DocOtak requested a review from Klankers July 11, 2025 06:28
@coveralls
Copy link

Pull Request Test Coverage Report for Build 16213402101

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 9 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.03%) to 90.909%

Files with Coverage Reduction New Missed Lines %
odf/sbe/io.py 9 83.51%
Totals Coverage Status
Change from base Build 16206973557: -0.03%
Covered Lines: 280
Relevant Lines: 308

💛 - Coveralls

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

Successfully merging this pull request may close these issues.

2 participants