-
Notifications
You must be signed in to change notification settings - Fork 9
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
Improving the CompressedList constructors #27
Comments
I think |
@LTLA Depending on your use case, @lawremi Looks like
The culprit seems to be this line IRanges/src/CompressedAtomicList_utils.c Line 147 in 52b13bf
int is passed to the PARTITIONED_AGG() macro, with the consequence that values in x are extracted as integer values. Apparently it's been broken since which.min() and which.max() got optimized in 2016 (commit c320278).
|
|
Looks like we can close this. (@lawremi I moved the |
I frequently use
CompressedList
s but I can't figure out how to create them without making alist
first. This is a common pattern:This is unfortunate because it spends time creating a large list with lots of little vectors before
unlist
ing everything again to create theCompressedList
. It seems like we could easily circumvent the middleman, possibly with an interface like:This would handle the reordering to create the internal
IRanges
and theunlistData
. It would also handle the type dispatch so that I don't have to explicitly callNumericList
for numeric values, etc. Finally, ifby=NULL
, it would do the same asas(stuff, "CompressedList")
, which allows for a slightly less verbose way to convert vectors intoCompressedList
s:The text was updated successfully, but these errors were encountered: