intrle
is by factor 50 faster and needs less RAM (2x its input vector) compared to rle
which needs 9x the RAM of its input vector.
This is achieved because we allow the C-code of intrle
to break when it turns out, that rle-packing will not achieve a
compression factor of 3 or better.
intisasc
is a faster version of is.unsorted
: it checks whether x
is sorted and returns NA x
contains NAs.
intisdesc
checks for being sorted descending and assumes that the input x
contains no NAs (is used after intisasc
and does not check for NAs).