Skip to content

Commit

Permalink
MD5+bench
Browse files Browse the repository at this point in the history
  • Loading branch information
2005m committed Feb 21, 2021
1 parent 50cb57a commit 031f4bf
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion MD5
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ d143e1321d840bb810d9648e54e22c9c *man/fpos.Rd
1cce4277e2dd16a0f68c96d744b7bc17 *man/funique.Rd
3e0b7c90f2f4a9c4be404cbc6ac69b16 *man/iif.Rd
578fe4903cc4f5d7bc5a6f346be1e9e9 *man/nif.Rd
f743be513a551d48d04f0a5f31c5f27d *man/psort.Rd
ef4ce6330a0f6a2ec63ccfd365729963 *man/psort.Rd
d4d3e5eb9266703d533ef42053474ac6 *man/psum.Rd
14e3add07190fd18d0161f4f0b0b5257 *man/setlevels.Rd
e0d3b091b5182fdcc8868c93a2c59476 *man/topn.Rd
Expand Down
14 changes: 14 additions & 0 deletions man/psort.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,18 @@ x = c("b","A","B","a","\xe4")
Encoding(x) = "latin1"
identical(psort(x, c.locale=FALSE), sort(x))
identical(psort(x, c.locale=TRUE), sort(x, method="radix"))

# Benchmarks
# ----------
# strings = as.character(as.hexmode(1:1000))
# x = sample(strings, 1e8, replace=TRUE)
# system.time({kit::psort(x, na.last = TRUE, nThread = 1L)})
# user system elapsed
# 2.833 0.434 3.277
# system.time({sort(x,method="radix",na.last = TRUE)})
# user system elapsed
# 5.597 0.559 6.176
# system.time({x[order(x,method="radix",na.last = TRUE)]})
# user system elapsed
# 5.561 0.563 6.143
}

0 comments on commit 031f4bf

Please sign in to comment.