Skip to content

Instantly share code, notes, and snippets.

Kevin Kuang kvnkuang

Block or report user

Report or block kvnkuang

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
kvnkuang / benchmarkPerformance.R
Created Nov 19, 2016
Benchmark the performance of pbapply and pbmcapply.
View benchmarkPerformance.R
timeConsumedPbapply <- data.table()
timeConsumedPbmcapply <- data.table()
timeConsumedapply <- data.table()
numCores <- 4L
repeats <- 50
maxNum <- 10
kvnkuang / benchmarkChildProcess.R
Created Nov 19, 2016
R code used for the benchmark of child processes created by pbapply/pbmcapply.
View benchmarkChildProcess.R
# A lazy sqrt function which doesn't care about efficiency.
# It is derived from the testcases of pbmcapply package.
# It allows the program to run for a prolonged process so that
# we can monitor the forking process.
lazySqrt <- function(num) {
# Sleep randomly between 0 to 1 second
You can’t perform that action at this time.