Open Kevin-Jin opened 7 years ago
A related issue is also properly handling negative indices in these functions (indicating that certain columns should be excluded while all others are retrieved).
Explicit calls to rep
should also not be necessary for the sake of recycling elements of value
in `[<-.mmap`()
.
Sequence detection would also be useful for mprotect()
and madvise()
since currently a system call is being issued per index passed. The system calls can easily accept contiguous records if we can detect sequential indices.
The offending code is found in
`[.mmap`()
and`[<-.mmap`()
inmmap.R
, i.e.:And in
convert_ij_to_i()
inmmap.c
, i.e.:Although a time complexity of O(n*m) is unavoidable, the amount of temporary space that is currently being used is certainly avoidable. It's easy to see how the current solution can be problematic for larger files.