Repository navigation
feat!: read CHAR variables as String - #79
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Contributor
Benchmark Results (Julia v1)Time benchmarks
Memory benchmarks
|
Beforerr
marked this pull request as ready for review
October 6, 2026 14:23
StaticString{N} put the field width in the eltype, so every new width
recompiled the DiskArrays/AbstractArray paths (10-50 ms each, plus
String/show). CHAR data is small metadata (labels, units), so a
width-independent eltype wins.
Beforerr
force-pushed
the
string-eltype
branch
from
October 6, 2026 14:25
9719ad9 to
79ebf46
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces
StaticString{N,UInt8}withStringas the eltype of CDF_CHAR/CDF_UCHAR variables.StaticStringput the field width in the type, so each new width recompiled the DiskArrays/AbstractArray read path plusString/show.Breaking:
eltype(var)for char variables changes, andCommonDataFormat.StaticStringis removed (nothing else in the org uses it).Measurements (fresh process, min of 5)
usingdata/:Array,v[1],String., showArrayof every var indata/First call per new width:
Array(label)10–14 ms → 0,label[1]29 ms → 0.Runtime:
Arrayof an 8-element label goes from 151 ns to 229 ns. Synthetic 1e6 × 16-byte records: 16 ms to build Strings vs 0.26 ms memcpy (56 MB vs 16 MB). That only matters for very large record-varying string variables.The single-file case is unchanged because its time goes to Base compiling
showforMatrix{String}(~140–190 ms). Both versions pay that.