Skip to content

Commit 3f018de

Browse files
committed
Deploying to gh-pages from @ adfb240 🚀
1 parent 7a691e7 commit 3f018de

6 files changed

Lines changed: 32 additions & 32 deletions

File tree

dev/articles/FAQ.html

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev/articles/FAQ.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -338,10 +338,10 @@ void add_one(cpp11::sexp x_sexp) {
338338
``` r
339339
x <- c(1L, 2L, 3L, 4L)
340340
.Internal(inspect(x))
341-
#> @56453498f478 13 INTSXP g0c2 [REF(2)] (len=4, tl=0) 1,2,3,4
341+
#> @55996130cfa8 13 INTSXP g0c2 [REF(2)] (len=4, tl=0) 1,2,3,4
342342
add_one(x)
343343
.Internal(inspect(x))
344-
#> @56453498f478 13 INTSXP g0c2 [REF(5)] (len=4, tl=0) 2,3,4,5
344+
#> @55996130cfa8 13 INTSXP g0c2 [MARK,REF(5)] (len=4, tl=0) 2,3,4,5
345345
x
346346
#> [1] 2 3 4 5
347347
```
@@ -590,8 +590,8 @@ bench::mark(
590590
#> # A tibble: 2 × 6
591591
#> expression min median `itr/sec` mem_alloc `gc/sec`
592592
#> <bch:expr> <bch:tm> <bch:tm> <dbl> <bch:byt> <dbl>
593-
#> 1 test_extract_cpp11(x) 41.7ms 44.91ms 21.6 0B 39.3
594-
#> 2 test_extract_r_api(x) 1.86ms 1.87ms 531. 0B 0
593+
#> 1 test_extract_cpp11(x) 39.88ms 42.6ms 22.9 0B 42.0
594+
#> 2 test_extract_r_api(x) 1.86ms 1.87ms 530. 0B 0
595595
```
596596

597597
We plan to improve on this in the future, but for now this is one of the

dev/articles/cpp11.html

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev/articles/cpp11.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ cpp_function('int add(int x, int y, int z) {
102102
add
103103
#> function (x, y, z)
104104
#> {
105-
#> .Call("_code_1e346b10c362_add", x, y, z, PACKAGE = "code_1e346b10c362")
105+
#> .Call("_code_1e2d15cc8726_add", x, y, z, PACKAGE = "code_1e2d15cc8726")
106106
#> }
107107
add(1, 2, 3)
108108
#> [1] 6
@@ -282,9 +282,9 @@ bench::mark(
282282
#> # A tibble: 3 × 6
283283
#> expression min median `itr/sec` mem_alloc `gc/sec`
284284
#> <bch:expr> <bch:tm> <bch:tm> <dbl> <bch:byt> <dbl>
285-
#> 1 sum(x) 2.03µs 2.05µs 473760. 0B 0
286-
#> 2 sum_cpp(x) 1.91µs 1.97µs 463325. 0B 46.3
287-
#> 3 sum_r(x) 26.06µs 26.36µs 37310. 31.7KB 0
285+
#> 1 sum(x) 2.02µs 2.05µs 472291. 0B 0
286+
#> 2 sum_cpp(x) 1.92µs 1.97µs 467618. 0B 46.8
287+
#> 3 sum_r(x) 25.91µs 26.18µs 36852. 31.7KB 0
288288
```
289289

290290
### Vector input, vector output
@@ -337,8 +337,8 @@ bench::mark(
337337
#> # A tibble: 2 × 6
338338
#> expression min median `itr/sec` mem_alloc `gc/sec`
339339
#> <bch:expr> <bch:tm> <bch:tm> <dbl> <bch:byt> <dbl>
340-
#> 1 pdist_r(0.5, y) 4.99ms 5.11ms 191. 7.63MB 95.5
341-
#> 2 pdist_cpp(0.5, y) 3.95ms 4ms 249. 7.63MB 126.
340+
#> 1 pdist_r(0.5, y) 4.8ms 4.93ms 200. 7.63MB 102.
341+
#> 2 pdist_cpp(0.5, y) 3.8ms 3.88ms 255. 7.63MB 127.
342342
```
343343

344344
On my computer, it takes around 5 ms with a 1 million element `y`
@@ -1160,8 +1160,8 @@ bench::mark(
11601160
#> # A tibble: 2 × 6
11611161
#> expression min median `itr/sec` mem_alloc `gc/sec`
11621162
#> <bch:expr> <dbl> <dbl> <dbl> <dbl> <dbl>
1163-
#> 1 r 43.9 44.1 1 32.3 Inf
1164-
#> 2 cpp 1 1 43.8 1 NaN
1163+
#> 1 r 42.9 43.0 1 32.3 10.1
1164+
#> 2 cpp 1 1 42.7 1 1
11651165
```
11661166

11671167
### R vectorisation versus C++ vectorisation
@@ -1278,9 +1278,9 @@ bench::mark(
12781278
#> # A tibble: 3 × 6
12791279
#> expression min median `itr/sec` mem_alloc `gc/sec`
12801280
#> <bch:expr> <bch:tm> <bch:tm> <dbl> <bch:byt> <dbl>
1281-
#> 1 vacc1 1.54ms 1.66ms 593. 7.86KB 35.7
1282-
#> 2 vacc2 42.6µs 45.49µs 20528. 146.68KB 39.0
1283-
#> 3 vacc3 12.08µs 12.35µs 79084. 14.02KB 15.8
1281+
#> 1 vacc1 1.55ms 1.61ms 610. 7.86KB 33.0
1282+
#> 2 vacc2 41.31µs 43.24µs 20683. 146.68KB 37.5
1283+
#> 3 vacc3 12.17µs 12.37µs 79650. 14.02KB 15.9
12841284
```
12851285

12861286
Not surprisingly, our original approach with loops is very slow.

dev/pkgdown.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ articles:
77
FAQ: FAQ.html
88
internals: internals.html
99
motivations: motivations.html
10-
last_built: 2026-01-20T20:05Z
10+
last_built: 2026-01-21T18:49Z
1111
urls:
1212
reference: https://cpp11.r-lib.org/reference
1313
article: https://cpp11.r-lib.org/articles

dev/search.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)