Why not just use the nightly build for now?

On Saturday, 9 May 2015 11:35:26 UTC+2, Sisyphuss wrote:

> I tried to build 0.4, but I met the following error:
>
> Makefile:141: /Makefile.rules: No such file or directory
> make[2]: *** No rule to make target `/Makefile.rules'.  Stop.
> make[1]: *** [llvm-3.3/build_Release/Release/lib/libLLVMCodeGen.a] Error 2
> make: *** [julia-deps] Error 2
>
>
>
>
> On Saturday, May 9, 2015 at 2:50:56 AM UTC+2, Tim Holy wrote:
>>
>> Yes, if you're on 0.4. Preface the function with @noinline. 
>>
>> --Tim 
>>
>> On Friday, May 08, 2015 11:25:24 PM Zheng Wendell wrote: 
>> > @Tim, can I explicitly deactivate the inline functionality ? 
>> > 
>> > On Fri, May 8, 2015 at 7:11 PM, Tim Holy <[email protected]> wrote: 
>> > > Yes, function get inlined within certain limits. You can check by 
>> using 
>> > > @code_typed and looking for :call expressions (@code_typed includes 
>> the 
>> > > inlining pass). 
>> > > 
>> > > Best, 
>> > > --Tim 
>> > > 
>> > > On Friday, May 08, 2015 09:30:57 AM Sisyphuss wrote: 
>> > > > The following code is aimed to study the benefit of vectorization: 
>> > > > 
>> > > > function f(a::Array{Float64,1}) 
>> > > > 
>> > > >   b = Array(eltype(a),size(a)) 
>> > > >   n=length(a) 
>> > > >   for i=1:n 
>> > > >   
>> > > >     b[i]=a[i]+1 
>> > > >   
>> > > >   end 
>> > > >   return b 
>> > > > 
>> > > > end 
>> > > > 
>> > > > function f(a::Float64) 
>> > > > 
>> > > >   b = a + 1 
>> > > > 
>> > > > end 
>> > > > 
>> > > > 
>> > > > function main1() 
>> > > > 
>> > > >   n = 1000000 
>> > > >   a = zeros(n) 
>> > > >   @timeit begin 
>> > > >   
>> > > >     b = Array(eltype(a),size(a)) 
>> > > >     for i=1:n 
>> > > >     
>> > > >       b[i] = f(a[i]) 
>> > > >     
>> > > >     end 
>> > > >   
>> > > >   end 
>> > > > 
>> > > > end 
>> > > > 
>> > > > function main2() 
>> > > > 
>> > > >   n = 1000000 
>> > > >   a = zeros(n) 
>> > > >   @timeit b=f(a) 
>> > > > 
>> > > > end 
>> > > > 
>> > > > begin 
>> > > > 
>> > > >   println("==========================") 
>> > > >   main1() 
>> > > >   main2() 
>> > > > 
>> > > > end 
>> > > > 
>> > > > `f` is the overloaded function, which can be either vectorized or 
>> not. 
>> > > > The goal is to transform every element of the vector `a` to `f(a)`, 
>> and 
>> > > > store it in `b`. 
>> > > > `main1` is non-vecorized, while `main2` is vectorized. 
>> > > > 
>> > > > I thought that `main2` could have been more efficient than `main1`, 
>> > > 
>> > > because 
>> > > 
>> > > > it has less function calls. 
>> > > > However, according to the experiment, there is actually no 
>> performance 
>> > > > difference between these two versions. 
>> > > > The reason, is it because that `f()` is inlined by the compiler 
>> > > > secretly? 
>>
>>

Reply via email to