I get this on newest master

julia> @time fill!(A, 0.);
  0.007519 seconds (4 allocations: 160 bytes)

julia> @time A[:] = 0.;
  0.010495 seconds (5 allocations: 176 bytes)

julia> @time ccall(:memset, Ptr{Void}, (Ptr{Void}, Cint, Csize_t), A, 0, 
sizeof(A));
  0.007656 seconds (4 allocations: 64 bytes)

Doesn't matter much though, won't be a bottle neck for anyones code.


On Monday, October 5, 2015 at 7:33:43 PM UTC+2, Tomas Lycken wrote:
>
> > but I'm using Julia 0.5, so maybe I have a better version of the A[:] 
> assignment.
>
> I love how Julia just gets more and more powerful...
>
> // T
>
> On Monday, October 5, 2015 at 6:48:00 PM UTC+2, Steven G. Johnson wrote:
>>
>>
>>
>> On Monday, October 5, 2015 at 12:29:17 PM UTC-4, Kristoffer Carlsson 
>> wrote:
>>>
>>> For me, the fill! version uses SIMD instructions so it is faster than 
>>> the A[:] version.
>>>
>>> Steven, maybe you are on a julia version / computer where you don't get 
>>> vectorized code from fill!.
>>>
>>
>> I'm on a machine with SIMD, but I'm using Julia 0.5, so maybe I have a 
>> better version of the A[:] assignment. 
>>
>

Reply via email to