See my answer. If you don't mind a copy/pasting a bunch of bit twiddly code 
from Base, this can be efficiently devectorized, and that turns out to be a 
decent perf win. But in this case the devectorized code is quite difficult 
to decipher and Stefan Schwarz's point definitely applies.

Simon

On Tuesday, August 26, 2014 4:42:59 PM UTC-4, Iain Dunning wrote:
>
> To muddy the water in this now somewhat confusing email thread: 
> devectorizing/avoiding memory allocation isn't always a win:
>
>
> http://stackoverflow.com/questions/25412323/how-can-i-do-a-bitwise-or-reduction-along-an-axis-of-a-boolean-array-in-julia/25414595#25414595
>
>
>
> On Tuesday, August 26, 2014 4:12:49 PM UTC-4, [email protected] wrote:
>>
>> >I'm a little surprised that you have found the performance implications 
>> unconvincing in discussions where the OGs advocate devectorization.
>>
>> A 10x speed-up on a 10 ms calculation is generally considered 
>> unconvincing. An unknown gain on an unprofiled code for an undefined 
>> context is definitely unconvincing, especially if the vectorized form is 
>> widely clearer. 
>>
>> I'm not talking about this specific case for which I find explicit loops 
>> at least as clear. But I, too, sometimes find the devectorization advice 
>> not convincing. But fortunately, this is usually for small scripts, not for 
>> actual Julia libs.
>>
>>

Reply via email to