-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add benchmarks directly in the docs (#26)
* let's try * better * add a sample bench -- not sure if it is the right way to go.
- Loading branch information
Showing
3 changed files
with
39 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
[deps] | ||
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" | ||
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" | ||
DocumenterCitations = "daee34ce-89f3-4625-b898-19384cb65244" | ||
LiveServer = "16fef848-5104-11e9-1b77-fb7a48bbb589" | ||
RateTables = "d40fb65e-c2ee-4113-9e14-cb96ca0acb32" | ||
RCall = "6f49c342-dc21-5d91-9882-a32aef131414" | ||
NetSurvival = "8f9d5d0e-dd2e-4568-92d4-f8c5d34f25cf" | ||
RCall = "6f49c342-dc21-5d91-9882-a32aef131414" | ||
RateTables = "d40fb65e-c2ee-4113-9e14-cb96ca0acb32" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
```@meta | ||
CurrentModule = NetSurvival | ||
``` | ||
|
||
# Benchmarking results | ||
|
||
The following benchmarks are run on github actions continuous integration platform, which is a very slow computing engine. Local experiments suggests performances that are twice as fast on correct hardware -- note that we do not use multithreading at all, but underlying BLAS calls might. | ||
|
||
```@example 1 | ||
using RCall | ||
using NetSurvival, RateTables, BenchmarkTools | ||
R_bench = @benchmark R""" | ||
relsurv::rs.surv( | ||
survival::Surv(time, stat) ~1, | ||
rmap=list(age = age, sex = sex, year = diag), | ||
data = relsurv::colrec, | ||
ratetable = relsurv::slopop, | ||
method = "pohar-perme", | ||
add.times=1:8149) | ||
""" | ||
jl_bench = @benchmark fit(PoharPerme, @formula(Surv(time,status)~1), colrec, slopop) | ||
ratio = time(minimum(R_bench)) / time(minimum(jl_bench)) | ||
``` | ||
|
||
|
||
# Benchmarking across time | ||
|
||
The folloiwng charts provide a glimpse of `NetSurvival.jl`'s performance along time: | ||
|
||
```@raw html | ||
<iframe src="/benchmarks/index.html" style="height:500px;width:100%;"></iframe> | ||
``` |