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 form significant in terms of performance. That would encourage
> people writing awkwardly long one-liners for all the wrong reasons.
>
> On Mon, Aug 10, 2015 at 1:01 AM, Jeffrey Sarnoff <
> jeffrey.sarn...@gmail.com> wrote:
>
>> 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?
>>
>
>


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 writing awkwardly long one-liners for all the wrong reasons.

On Mon, Aug 10, 2015 at 1:01 AM, Jeffrey Sarnoff 
wrote:

> 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?
>


[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?