Skip to content

Compiler optimizations - #21

Merged
Bisaloo merged 8 commits into
mainfrom
compiler-optimizations
Aug 3, 2026
Merged

Compiler optimizations#21
Bisaloo merged 8 commits into
mainfrom
compiler-optimizations

Conversation

@Bisaloo

@Bisaloo Bisaloo commented Aug 3, 2026

Copy link
Copy Markdown
Owner

No description provided.

@codecov-commenter

codecov-commenter commented Aug 3, 2026

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 83.92857% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.96%. Comparing base (b846220) to head (139b4ed).

Files with missing lines Patch % Lines
src/float16_conversion.h 61.11% 7 Missing ⚠️
src/bit64_conversion.h 93.93% 2 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #21      +/-   ##
==========================================
+ Coverage   90.11%   90.96%   +0.84%     
==========================================
  Files           6        6              
  Lines         354      354              
==========================================
+ Hits          319      322       +3     
+ Misses         35       32       -3     

☔ View full report in Codecov by Harness.
📢 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 Aug 3, 2026

Copy link
Copy Markdown

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

  • ✔️pkg_load: 3.65ms -> 3.68ms [-0.81%, +2.3%]
  • ✔️read_float16: 586µs -> 594µs [-0.04%, +2.9%]
    Further explanation regarding interpretation and methodology can be found in the documentation.

@Bisaloo
Bisaloo force-pushed the compiler-optimizations branch from 466cb87 to c0ca7cf Compare August 3, 2026 09:41
@Bisaloo
Bisaloo force-pushed the compiler-optimizations branch from c0ca7cf to 7169cdf Compare August 3, 2026 09:46
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

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

  • ✔️pkg_load: 6.02ms -> 6.04ms [-1.73%, +2.41%]
  • ✔️read_bigendian: 850µs -> 857µs [-0.39%, +2.15%]
  • ✔️read_bool: 878µs -> 870µs [-3.81%, +2%]
  • ✔️read_empty: 834µs -> 839µs [-0.45%, +1.68%]
  • ✔️read_float16: 876µs -> 878µs [-2.66%, +3.07%]
  • ✔️read_float32: 858µs -> 861µs [-0.97%, +1.6%]
  • ✔️read_float64: 870µs -> 869µs [-1.38%, +1.25%]
  • ✔️read_int16: 860µs -> 862µs [-1.59%, +1.98%]
  • ❗🐌read_int32: 855µs -> 871µs [+0.54%, +3.12%]
  • ✔️read_int64: 1.29ms -> 1.3ms [-0.49%, +2.01%]
  • ✔️read_int8: 878µs -> 879µs [-1.41%, +1.63%]
  • ✔️read_npz: 2.54ms -> 2.58ms [-0.68%, +3.96%]
  • ✔️read_string: 766µs -> 778µs [-2.07%, +5.09%]
  • ❗🐌read_structured: 1.59ms -> 1.62ms [+0.48%, +3.74%]
  • ✔️read_uint16: 834µs -> 837µs [-0.81%, +1.43%]
  • ❗🐌read_uint32: 1.1ms -> 1.11ms [+0.14%, +2.44%]
  • ✔️read_uint64: 1.25ms -> 1.26ms [-0.64%, +2.09%]
  • ✔️read_uint8: 830µs -> 834µs [-0.51%, +1.54%]
  • ✔️read_unicode: 923µs -> 930µs [-1.23%, +2.74%]
    Further explanation regarding interpretation and methodology can be found in the documentation.

@Bisaloo

Bisaloo commented Aug 3, 2026

Copy link
Copy Markdown
Owner Author

On 1000x1000 arrays:

float16

✔ Installing branch 'compiler-optimizations'
✔ 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 compiler-optimiz… "read_npy… 1.02ms 3.52ms      283.    9.68MB     71.3  7989  2011      28.2s <dbl[…]> <Rprofmem> <bench_tm> <tibble>
2 main              "read_npy… 1.31ms 3.67ms      271.    9.68MB     68.1  7989  2011      29.5s <dbl[…]> <Rprofmem> <bench_tm> <tibble>

uint32

✔ Installing branch 'compiler-optimizations'
✔ 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 compiler-optimiz… "read_npy… 3.51ms 3.85ms      247.    7.84MB     74.6  7684  2316      31.1s <int[…]> <Rprofmem> <bench_tm> <tibble>
2 main              "read_npy… 3.71ms 4.12ms      231.    7.84MB     69.5  7684  2316      33.3s <int[…]> <Rprofmem> <bench_tm> <tibble>

int64

✔ Installing branch 'compiler-optimizations'
✔ 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 compiler-optimiz… "read_npy… 6.94ms 7.65ms      131.    11.7MB     43.7  7501  2499      57.2s <int[…]> <Rprofmem> <bench_tm> <tibble>
2 main              "read_npy… 6.85ms 7.72ms      129.    11.7MB     43.0  7501  2499      58.1s <int[…]> <Rprofmem> <bench_tm> <tibble>

@Bisaloo

Bisaloo commented Aug 3, 2026

Copy link
Copy Markdown
Owner Author

uint32

✔ Installing branch 'compiler-optimizations'
✔ 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:tm> <bch:tm>     <dbl> <bch:byt>    <dbl> <int> <dbl>   <bch:tm> <list>   <list>     <list>     <list>  
1 compiler-optimizations "read_npy(\"inst/extdata/test_large.npy\")"   1.11ms   1.24ms      691.    7.84MB    208.   7684  2316      11.1s <int[…]> <Rprofmem> <bench_tm> <tibble>
2 main                   "read_npy(\"inst/extdata/test_large.npy\")"   3.65ms   3.87ms      245.    7.84MB     73.9  7684  2316      31.3s <int[…]> <Rprofmem> <bench_tm> <tibble>

uint64

✔ Installing branch 'compiler-optimizations'
✔ 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:tm> <bch:tm>     <dbl> <bch:byt>    <dbl> <int> <dbl>   <bch:tm> <list>   <list>     <list>     <list>  
1 compiler-optimizations "read_npy(\"inst/extdata/test_large.npy\")"   4.93ms   5.59ms      178.    11.7MB     59.3  7501  2499      42.2s <int[…]> <Rprofmem> <bench_tm> <tibble>
2 main                   "read_npy(\"inst/extdata/test_large.npy\")"   6.97ms    7.8ms      128.    11.7MB     42.8  7501  2499      58.4s <int[…]> <Rprofmem> <bench_tm> <tibble>

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

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

  • ✔️pkg_load: 5.13ms -> 5.13ms [-1.63%, +1.39%]
  • ❗🐌read_bigendian: 802µs -> 819µs [+1.1%, +3.18%]
  • ✔️read_bool: 822µs -> 834µs [-1.99%, +4.76%]
  • ✔️read_empty: 783µs -> 790µs [-0.36%, +2.17%]
  • ❗🐌read_float16: 836µs -> 849µs [+0.58%, +2.57%]
  • ✔️read_float32: 828µs -> 836µs [-0.2%, +2%]
  • ✔️read_float64: 839µs -> 828µs [-5.69%, +3.05%]
  • ✔️read_int16: 838µs -> 845µs [-0.23%, +1.87%]
  • ❗🐌read_int32: 833µs -> 838µs [+0.01%, +1.19%]
  • ✔️read_int64: 1.24ms -> 1.25ms [-0.08%, +2.84%]
  • ❗🐌read_int8: 850µs -> 865µs [+0.56%, +3.15%]
  • ❗🐌read_npz: 2.4ms -> 2.44ms [+0.88%, +2.98%]
  • ✔️read_string: 722µs -> 737µs [-1.63%, +5.83%]
  • ❗🐌read_structured: 1.48ms -> 1.5ms [+0.31%, +2.87%]
  • ❗🐌read_uint16: 771µs -> 782µs [+0.66%, +2.17%]
  • ❗🐌read_uint32: 1.02ms -> 1.03ms [+0.78%, +1.86%]
  • ❗🐌read_uint64: 1.15ms -> 1.16ms [+0.12%, +1.51%]
  • ❗🐌read_uint8: 771µs -> 783µs [+0.48%, +2.67%]
  • ✔️read_unicode: 829µs -> 840µs [-0.13%, +2.67%]
    Further explanation regarding interpretation and methodology can be found in the documentation.

@Bisaloo
Bisaloo merged commit 146fa98 into main Aug 3, 2026
13 checks passed
@Bisaloo
Bisaloo deleted the compiler-optimizations branch August 3, 2026 17:58
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