bigmemory icon indicating copy to clipboard operation
bigmemory copied to clipboard

Can we replace bigmemory with a small ALTREP?

Open kaneplusplus opened this issue 8 years ago • 5 comments

kaneplusplus avatar Sep 20 '17 15:09 kaneplusplus

Not sure, certainly an interesting question. The 'example' package, simplemmap, demonstrating this can be found here.

cdeterman avatar Sep 20 '17 15:09 cdeterman

I found this presentation.

Maybe @ltierney could give some insight.

privefl avatar Sep 20 '17 15:09 privefl

@cdeterman and @privefl after looking at the slides I think we can do this and I like the idea of making a big.matrix a first-class R object. I guess the question now is should we look closer at doing this? If we should, what will this look like? Will it be better than the current package or are we essentially reimplementing what we currently have?

kaneplusplus avatar Sep 20 '17 16:09 kaneplusplus

I don't think it is a re-implementation as the 'shared memory' aspect of bigmemory is rather unique. I think this ALTREP representation is just finding a way to make the objects more compact.

cdeterman avatar Sep 20 '17 16:09 cdeterman

@cdeterman It has been marketed for compact object representation but overriding duplicate could be used so that copied big.matrix objects can have copy-on-write behavior. If you are not going to make too many changes to a mmaped object, you could even cause a copied object to trigger a private mapping.

The vignette is also a good resource.

kaneplusplus avatar Sep 20 '17 17:09 kaneplusplus