The wish item is about API for efficient pop and push methods, that operates in-place. Because R is a functional language I understand it might not provide such methods directly. Still it makes perfect sense to provide R C API for developers who needs efficient in-place pop and push methods, to avoid memcpy, memmove or R-level copies. It is important for R to not lag behind other languages, as pop/push methods are pretty fundamental element of many systems. As of now SETLENGTH and SET_TRUELENGTH are not part of public API, and AFAIU won't fully address the request. I recall a grow-able vectors in recent R development, maybe that would be proper place for formulating such API.
Some related SO:
https://stackoverflow.com/questions/57334741/subsetting-a-large-vector-uses-unnecessarily-large-amounts-of-memoryhttps://stackoverflow.com/questions/2778510/efficiently-adding-or-removing-elements-to-a-vector-or-list-in-r
The wish item is about API for efficient pop and push methods, that operates in-place. Because R is a functional language I understand it might not provide such methods directly. Still it makes perfect sense to provide R C API for developers who needs efficient in-place pop and push methods, to avoid
memcpy
,memmove
or R-level copies. It is important for R to not lag behind other languages, as pop/push methods are pretty fundamental element of many systems. As of now SETLENGTH and SET_TRUELENGTH are not part of public API, and AFAIU won't fully address the request. I recall a grow-able vectors in recent R development, maybe that would be proper place for formulating such API. Some related SO: https://stackoverflow.com/questions/57334741/subsetting-a-large-vector-uses-unnecessarily-large-amounts-of-memory https://stackoverflow.com/questions/2778510/efficiently-adding-or-removing-elements-to-a-vector-or-list-in-r