Skip to contents

This data frame contains full-fit estimation times for a preference space mixed logit model estimated with logitr as the number of random draws grows to 10,000, comparing the three logitr backends: the native R "cpu" path, the compiled "cpp" backend on a single core, and the compiled backend on all cores. Unlike runtimes, this is a logitr-only benchmark used to show how logitr scales to draw counts the other packages cannot reach in tractable time. It is generated by the script data-raw/runtimes.R in the package repository, run on the same 10-core Apple M-series Mac as the runtimes benchmark, so the absolute times are specific to that machine.

Usage

data(runtimes_draws)

Format

VariableDescription
configThe logitr backend used: "cpu", "cpp (1 core)", or "cpp (10 cores)" (all cores on the benchmark machine).
time_secThe estimation time in seconds.
numDrawsThe number of random draws used during estimation.

Source

The data-raw/runtimes.R script in the logitr repository.

Examples

data(runtimes_draws)

head(runtimes_draws)
#> # A tibble: 6 × 3
#>   config         time_sec numDraws
#>   <fct>             <dbl>    <dbl>
#> 1 cpu               4.74       100
#> 2 cpp (1 core)      1.07       100
#> 3 cpp (10 cores)    0.326      100
#> 4 cpu              28.7        500
#> 5 cpp (1 core)      6.26       500
#> 6 cpp (10 cores)    1.06       500