Skip to content

Commit

Permalink
Update vignettes/datatable-benchmarking.Rmd
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Chirico <[email protected]>
  • Loading branch information
davidbudzynski and MichaelChirico authored Nov 3, 2023
1 parent 5744534 commit 5b8b1dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vignettes/datatable-benchmarking.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Those options affect many more optimizations and thus should not be used when on

# _by reference_ operations

When benchmarking `set*` functions it makes sense to measure the first run only. These functions update their input by reference, so subsequent runs will use already-processed `data.table`, biasing the results.
When benchmarking `set*` functions it only makes sense to measure the first run. These functions update their input by reference, so subsequent runs will use already-processed `data.table`, biasing the results.

Protecting your `data.table` from being updated by reference operations can be achieved using `copy` or `data.table:::shallow` functions. Be aware `copy` might be very expensive as it needs to duplicate whole object. It is unlikely we want to include duplication time in time of the actual task we are benchmarking.

Expand Down

0 comments on commit 5b8b1dc

Please sign in to comment.