Skip to content

Commit

Permalink
benchmark only against the fastest lm() friend
Browse files Browse the repository at this point in the history
  • Loading branch information
simonpcouch committed Aug 1, 2024
1 parent e3529b8 commit 625b9b7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
5 changes: 0 additions & 5 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,6 @@ system.time(
system.time(
# lm()'s speedy friend, from base R
lm.fit(x, y)
)
system.time(
# lm()'s even speedier friend, from base R
.lm.fit(x, y)
)
Expand Down
13 changes: 3 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,29 +37,22 @@ system.time(
lm(y ~ ., dat)
)
#> user system elapsed
#> 1.340 0.227 1.574
#> 1.554 0.229 1.791

system.time(
# lm()'s speedy friend, from base R
lm.fit(x, y)
)
#> user system elapsed
#> 0.476 0.031 0.508

system.time(
# lm()'s even speedier friend, from base R
.lm.fit(x, y)
)
#> user system elapsed
#> 0.401 0.023 0.426
#> 0.398 0.021 0.420

library(rinfa)

system.time({
.linfa_linear_reg(x, y)
})
#> user system elapsed
#> 0.217 0.081 0.301
#> 0.208 0.083 0.297
```

To use rinfa with tidymodels, set the modeling engine to `"linfa"`:
Expand Down

0 comments on commit 625b9b7

Please sign in to comment.