tdhock / atime

Asymptotic timing
6 stars 3 forks source link

data.table frollmax on descending #25

Open tdhock opened 9 months ago

tdhock commented 9 months ago

@DorisAmoakohene please translate https://github.com/Rdatatable/data.table/issues/5923 to atime and post results here.

DorisAmoakohene commented 9 months ago

this is the result after I use atime using this code

result.frollmax <- atime::atime(

  N = 10^seq(1,3),
  setup = {
    set.seed(123)
    atime <- function(N, k, func) {
      x = func(N)
      y.data.table = data.table::frollmax(x, k)

    }
  },
  seconds.limit = 2,
  expr.list = list(
    normal = quote(atime(N, 10^seq(1,3), rnorm)),
    equalto0 = quote(atime(N, 10^seq(1,3), function(N) {rep(0, N)})),
    ascending = quote(atime(N, 10^seq(1,3), function(N) {seq(0, length.out=N)})),
    descending = quote(atime(N, 10^seq(1,3), function(N) {seq(0, by=-1, length.out=N)}))
  )
)

imageee)

tdhock commented 9 months ago

great start, please increase N so we may see more differences.

DorisAmoakohene commented 9 months ago

by increasing N = 10^seq(1,7), this is the result I am getting

image

also is there a reason why descending cut at some point(1e05)?

tdhock commented 9 months ago

descending is cut because it went over seconds.limit

tdhock commented 9 months ago

is your result consistent with the original?

DorisAmoakohene commented 9 months ago

yes, it is

tdhock commented 6 months ago

please link to the code that you created and then close after