Skip to content

Add support for structured datatypes - #3

Merged
Bisaloo merged 7 commits into
mainfrom
structured-type
May 4, 2026
Merged

Add support for structured datatypes#3
Bisaloo merged 7 commits into
mainfrom
structured-type

Conversation

@Bisaloo

@Bisaloo Bisaloo commented May 4, 2026

Copy link
Copy Markdown
Owner

No description provided.

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 95.76271% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.51%. Comparing base (a827ae9) to head (1a54ed6).

Files with missing lines Patch % Lines
R/read_npy.R 95.76% 5 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##             main       #3      +/-   ##
==========================================
- Coverage   85.71%   85.51%   -0.20%     
==========================================
  Files           6        6              
  Lines         343      366      +23     
==========================================
+ Hits          294      313      +19     
- Misses         49       53       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions

github-actions Bot commented May 4, 2026

Copy link
Copy Markdown

This is how benchmark results would change (along with a 95% confidence interval in relative change) if 1a54ed6 is merged into main:

  • ❗🐌pkg_load: 4.77ms -> 4.9ms [+0.38%, +5.18%]
  • ❗🐌read_bigendian: 1.14ms -> 11.3ms [+888.76%, +900.59%]
  • ❗🐌read_bool: 1.15ms -> 11.5ms [+891.12%, +904.39%]
  • ❗🐌read_empty: 1.09ms -> 11ms [+909.82%, +914.02%]
  • ❗🐌read_float32: 1.19ms -> 12.1ms [+895.23%, +928.48%]
  • ❗🐌read_float64: 1.18ms -> 12ms [+898.02%, +931.67%]
  • ❗🐌read_int16: 1.17ms -> 11.9ms [+908.83%, +921.17%]
  • ❗🐌read_int32: 1.2ms -> 11.8ms [+875.94%, +891.64%]
  • ❗🐌read_int8: 1.17ms -> 11.8ms [+902.84%, +916.49%]
  • ❗🐌read_npz: 2.81ms -> 12.8ms [+354.67%, +358.35%]
  • ❗🐌read_string: 1.13ms -> 11.4ms [+901.83%, +919.91%]
  • ❗🐌read_uint16: 1.09ms -> 11.1ms [+912.75%, +924.11%]
  • ❗🐌read_uint32: 1.4ms -> 11.8ms [+730.44%, +745.43%]
  • ❗🐌read_uint64: 1.53ms -> 11.6ms [+653.77%, +664.16%]
  • ❗🐌read_uint8: 1.09ms -> 11.2ms [+914.96%, +926.92%]
  • ❗🐌read_unicode: 1.19ms -> 11.1ms [+833.55%, +838.63%]
    Further explanation regarding interpretation and methodology can be found in the documentation.

@Bisaloo

Bisaloo commented May 4, 2026

Copy link
Copy Markdown
Owner Author

Slowdown only impacts header parsing, which means it's not noticeable in larger arrays. In smaller arrays, it doesn't matter:

cross::bench_branches(
  {
    library(grumpy)
    bench::mark(
      read_npy(system.file("extdata", "test.npy", package = "grumpy")),
      iterations = 50
    )
  }
)
✔ Installing branch 'structured-type'
✔ Installing branch 'main'
✔ Running `expr` across variants
# A tibble: 2 × 14
  branch          expression                   min median `itr/sec` mem_alloc `gc/sec` n_itr  n_gc total_time result   memory     time       gc      
  <chr>           <bch:expr>                 <bch> <bch:>     <dbl> <bch:byt>    <dbl> <int> <dbl>   <bch:tm> <list>   <list>     <list>     <list>  
1 structured-type "read_npy(system.file(\"e… 212µs  251µs     3959.    1.57MB     80.8    49     1     12.4ms <dbl[…]> <Rprofmem> <bench_tm> <tibble>
2 main            "read_npy(system.file(\"e… 253µs  284µs     3462.  437.27KB     70.6    49     1     14.2ms <dbl[…]> <Rprofmem> <bench_tm> <tibble>

@Bisaloo
Bisaloo merged commit 235e848 into main May 4, 2026
11 checks passed
@Bisaloo
Bisaloo deleted the structured-type branch May 4, 2026 15:30
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