base::sort but fast using parallelism. Experimental.
fsort(x, decreasing = FALSE, na.last = FALSE, internal=FALSE, verbose=FALSE, ...)
A vector. Type double, currently.
Control treatment of
TRUE, missing values in the data are put last; if
FALSE, they are put first; if
NA, they are removed; if
"keep" they are kept with rank
Internal use only. Temporary variable. Will be removed.
Print tracing information.
Not sure yet. Should be consistent with base R.
Process will raise error if
x contains negative values.
x is already sorted
fsort will redirect processing to slower single threaded order followed by subset in following cases:
data type other than double (numeric)
The input in sorted order.
x = runif(1e6) system.time(ans1 <- sort(x, method="quick")) #> user system elapsed #> 0.124 0.008 0.133 system.time(ans2 <- fsort(x)) #> user system elapsed #> 0.046 0.005 0.051 identical(ans1, ans2) #>  TRUE