Re: [julia-users] is @inline redundant with fn(a::Int) = do_something(a) ?

2015-08-10 Thread Jeffrey Sarnoff
got it On Mon, Aug 10, 2015 at 12:38 PM, Stefan Karpinski wrote: > If that's all there is to a definition it's pretty likely to get inlined, > but you can write arbitrarily complex expressions, so it's not quite the > same. I really don't think we should make using one-liner vs longer > function

Re: [julia-users] is @inline redundant with fn(a::Int) = do_something(a) ?

2015-08-10 Thread Stefan Karpinski
If that's all there is to a definition it's pretty likely to get inlined, but you can write arbitrarily complex expressions, so it's not quite the same. I really don't think we should make using one-liner vs longer function form significant in terms of performance. That would encourage people writi

[julia-users] is @inline redundant with fn(a::Int) = do_something(a) ?

2015-08-09 Thread Jeffrey Sarnoff
Is there a reason to add @inline to functions that are defined using the form fn(x) = do_fn(x), or is it redundant in v0.4?