Skip to content
Prev 1203 / 2152 Next

About Multicore: mclapply

On 01/16/2012 08:00 AM, Simon Urbanek wrote:
In case it's not clear, the system.time 'elapsed' time shows that 
mclapply *is* faster overall ('wall clock') -- I would have only .261 
seconds to go for coffee, compared to .419 with lapply.

As Simon suggests, a much more common paradigm is to put more work in to 
the function evaluated by lapply --, e.g., calculating qa() -- and then 
returning the result of the computation, typically a much smaller 
summary of the bigger data. Even in this case, your computer will need 
to have enough memory to hold all the fastq data in memory; for some 
purposes it will make more sense to use FastqSampler and FastqStreamer 
to iterate over your file.

Martin