[julia-users] Re: Unexpected Performance Behaviour

2016-08-02 Thread Dan
The following standalone version recovers the speed of `test2` using the @fastmath macro. Integer exponents have trade-offs in implementation using repeated squaring and multiplication and intrinsic power instructions. Not really sure how to control the implementation used in every instance.

Re: [julia-users] Re: Unexpected Performance Behaviour

2016-08-02 Thread Christoph Ortner
issue 17759 On Tuesday, 2 August 2016 13:54:06 UTC+1, Christoph Ortner wrote: > > Ok - I will go ahead and file another bug report >

Re: [julia-users] Re: Unexpected Performance Behaviour

2016-08-02 Thread Christoph Ortner
I think even powers are treated differently, e.g., if I replace r^3+r^5 with ` r^2*r + r^2^2*r` then I get the right performance. On Tuesday, 2 August 2016 13:29:24 UTC+1, Mauro wrote: > > On Tue, 2016-08-02 at 14:07, Mauro > wrote: > > Oh, I see, this is in this issue:

Re: [julia-users] Re: Unexpected Performance Behaviour

2016-08-02 Thread Christoph Ortner
Ok - I will go ahead and file another bug report

Re: [julia-users] Re: Unexpected Performance Behaviour

2016-08-02 Thread Mauro
On Tue, 2016-08-02 at 14:07, Mauro wrote: > Oh, I see, this is in this issue: > https://github.com/JuliaLang/julia/issues/17751 It's not, after all, sorry! (a bit related though) And another wired thing, this seems to be dependent on using x^3. Running: function

[julia-users] Re: Unexpected Performance Behaviour

2016-08-02 Thread Frank Otto
Hello Christoph, I can confirm this behavior on 0.5.0-rc0. Notably, the generated LLVM code is identical for both cases: julia> @code_llvm test1(1_000_000) define double @julia_test1_68549(i64) #0 { top: %1 = icmp slt i64 %0, 1 br i1 %1, label %L2, label %if.preheader if.preheader:

Re: [julia-users] Re: Unexpected Performance Behaviour

2016-08-02 Thread Mauro
Oh, I see, this is in this issue: https://github.com/JuliaLang/julia/issues/17751 On Tue, 2016-08-02 at 10:52, Mauro wrote: > Yes, test2 is slower on 0.4 (expected), test1 is slower on 0.5 (weird) > on my Linux (Intel) machine. Christoph is right, in 0.5 these should >

Re: [julia-users] Re: Unexpected Performance Behaviour

2016-08-02 Thread Mauro
Yes, test2 is slower on 0.4 (expected), test1 is slower on 0.5 (weird) on my Linux (Intel) machine. Christoph is right, in 0.5 these should preform the same. And certainly, no function should be 1000x slower on 0.5 than on 0.4. A quick search did not turn up a bug report:

[julia-users] Re: Unexpected Performance Behaviour

2016-08-01 Thread Eric Forgy
I still don't understand the details of the new functions in v0.5. but I'd be inclined to think this test depends on whether you're on v0.4.6 or v0.5.0. On Tuesday, August 2, 2016 at 12:53:27 PM UTC+8, Greg Plowman wrote: > > I get timing/allocations the other way around. (test1, hard-coded

[julia-users] Re: Unexpected Performance Behaviour

2016-08-01 Thread 'Greg Plowman' via julia-users
I get timing/allocations the other way around. (test1, hard-coded version is fast without allocation) @code_warntype for test2 shows type-instability for s (because return type cannot be inferred for f1) On Tuesday, August 2, 2016 at 2:33:24 PM UTC+10, Christoph Ortner wrote: > Below are two