From rphilosof at health.sdu.dk  Wed Mar 18 14:45:17 2009
From: rphilosof at health.sdu.dk (Rune Schjellerup Philosof)
Date: Wed, 18 Mar 2009 14:45:17 +0100
Subject: [Rd] R thread safe
In-Reply-To: <4BD0BA7D-242B-4D27-A346-745AB8AD088E@r-project.org>
References: 1131389848.436fa39855a52@webmail.unibas.ch
	<49C0F021.8000108@health.sdu.dk>
	<4BD0BA7D-242B-4D27-A346-745AB8AD088E@r-project.org>
Message-ID: <49C0FAED.6030604@health.sdu.dk>

Simon Urbanek wrote:
> On Mar 18, 2009, at 8:59 , Rune Schjellerup Philosof wrote:
>> A simple example of use:
>>  data1 <- data2 <- matrix(0, r, c)
>>  dataFiller <- function(i) {
>>   tmp <- someCalculation(i)
>>   data1[, i] <<- tmp$result1
>>   data2[, i] <<- tmp$result2
>>  }
>>  runParallelInThreads(1:c, dataFiller)
>>
>> If this can be done almost as fast and simple with processes, for
>> instance using the multicore package, then I think it needs to be better
>> documented.
>
> Can you elaborate on the last sentence, please? Things cannot happen
> if you don't ask ...
>

What I meant with the sentence was:
- How would you do the example above using the multicore package?
- What is the magnitude of speed reduction comparing the multicore
solution with the hypothetical solution using threads?

-- 
Cheers
Rune Schjellerup Philosof



[Rd] R thread safe
Rune Schjellerup Philosof