Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[experimental] make use of data.table #877

Closed
wants to merge 2 commits into from
Closed

[experimental] make use of data.table #877

wants to merge 2 commits into from

Conversation

JanMarvin
Copy link
Owner

A recent post on the r-devel mailinglist reminded me of the data.table package. We have quite a few data frames, or to be precise, I built this package around data frames. There might be some gains using the data.table package, but unfortunately I have not used data.table for quite some time and even when I did, my knowledge was quite limited.

Though I like the package, their long time maintainer and their development ideas. Therefore if we would see some larger gains, I'd be willing to switch to it. Though, I lack time and motivation to do it just for a few microseconds. In the example below (writing a 10.000 x 1.000 matrix, this improves the profvis runtime by about 1.000ms which is nice, but still just 1s.

Since these small performance gains are hard to measure, even benchmarking if something is faster takes a lot of time. And while hunting for some seconds can be fun, more often it is not.

mm <- matrix(1, 1e4, 1e3)

library(openxlsx2)

wb <- wb_workbook()$add_worksheet()

profvis::profvis(wb$add_data(x = mm))

# wb$open()

rm(list = ls())
gc()

@JanMarvin JanMarvin mentioned this pull request Dec 30, 2023
@JanMarvin JanMarvin closed this Dec 30, 2023
@JanMarvin JanMarvin deleted the data_table branch December 30, 2023 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant