Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion vignettes/converting.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Rcpp vectors have a `push_back()` method, but unlike `std::vector()` no addition
This makes calling `push_back()` repeatably very expensive, as the entire vector has to be copied each call.

In contrast `cpp11` vectors grow efficiently, reserving extra space.
Because of this you can do ~10,000,00 vector appends with cpp11 in approximately the same amount of time that Rcpp does 10,000, as this benchmark demonstrates.
Because of this you can do ~10,000,000 vector appends with cpp11 in approximately the same amount of time that Rcpp does 10,000, as this benchmark demonstrates.

```{r, message = FALSE, eval = cpp11test:::should_run_benchmarks()}
grid <- expand.grid(len = 10 ^ (0:7), pkg = "cpp11", stringsAsFactors = FALSE)
Expand Down
2 changes: 1 addition & 1 deletion vignettes/motivations.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ Rcpp vectors have a `push_back()` method, but unlike `std::vector()` no addition
This makes calling `push_back()` repeatably very expensive, as the entire vector has to be copied each call.

In contrast `cpp11` vectors grow efficiently, reserving extra space.
Because of this you can do ~10,000,00 vector appends with cpp11 in approximately the same amount of time that Rcpp does 10,000, as this benchmark demonstrates.
Because of this you can do ~10,000,000 vector appends with cpp11 in approximately the same amount of time that Rcpp does 10,000, as this benchmark demonstrates.

```{r, message = FALSE, eval = cpp11test:::should_run_benchmarks()}
grid <- expand.grid(len = 10 ^ (0:7), pkg = "cpp11", stringsAsFactors = FALSE)
Expand Down