[jira] [Comment Edited] (ARROW-3051) [C++] Status performance optimization from Impala/Kudu

2018-08-15 Thread Dimitri Vorona (JIRA)


[ 
https://issues.apache.org/jira/browse/ARROW-3051?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16580379#comment-16580379
 ] 

Dimitri Vorona edited comment on ARROW-3051 at 8/15/18 7:51 AM:


In that case copy-elision won't work even with the change  
[http://cpp.sh/3x25h] . Even worse: while using const reference with temporary 
gives a correct behaviour, it disables RVO, since it isn't specified to work on 
references (see returnNoisy[2-4]).

EDIT: OTOH, if we return a new Status::OK() in the end of the function, which 
is common, RVO won't work anyway, and we save ourselves a copy in the most 
common case (i.e. when status is ok).

OK Status copy being virtually free, I doubt we could produce any numbers 
showing the difference, but I can't think of any reasonable example, were it 
could make things worse.


was (Author: alendit):
In that case copy-elision won't work even with the change  
[http://cpp.sh/3x25h] . Even worse: while using const reference with temporary 
gives a correct behaviour, it disables RVO, since it isn't specified to work on 
references (see returnNoisy[2-4]).

EDIT: OTOH, if we return a new Status::OK() in the end of the function, which 
is common, RVO won't work anyway, and we save ourselves a copy in the most 
common case (i.e. when status is ok).

OK Status copy being virtually free, I doubt we could produce any numbers, but 
I can't think of any reasonable example, were it could make things worse.

> [C++] Status performance optimization from Impala/Kudu
> --
>
> Key: ARROW-3051
> URL: https://issues.apache.org/jira/browse/ARROW-3051
> Project: Apache Arrow
>  Issue Type: Improvement
>  Components: C++
>Reporter: Wes McKinney
>Priority: Major
> Fix For: 0.11.0
>
>
> Just saw this patch, worth investigating: 
> https://github.com/apache/impala/commit/ea615d1d8026dbe1cda3f5c2b048d210b2df435b



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (ARROW-3051) [C++] Status performance optimization from Impala/Kudu

2018-08-15 Thread Dimitri Vorona (JIRA)


[ 
https://issues.apache.org/jira/browse/ARROW-3051?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16580379#comment-16580379
 ] 

Dimitri Vorona edited comment on ARROW-3051 at 8/15/18 7:50 AM:


In that case copy-elision won't work even with the change  
[http://cpp.sh/3x25h] . Even worse: while using const reference with temporary 
gives a correct behaviour, it disables RVO, since it isn't specified to work on 
references (see returnNoisy[2-4]).

EDIT: OTOH, if we return a new Status::OK() in the end of the function, which 
is common, RVO won't work anyway, and we save ourselves a copy in the most 
common case (i.e. when status is ok).

OK Status copy being virtually free, I doubt we could produce any numbers, but 
I can't think of any reasonable example, were it could make things worse.


was (Author: alendit):
In that case copy-elision won't work even with the change  
[http://cpp.sh/3x25h] . Even worse: while using const reference with temporary 
gives a correct behaviour, it disables RVO, since it isn't specified to work on 
references (see returnNoisy[2-4]).

 

> [C++] Status performance optimization from Impala/Kudu
> --
>
> Key: ARROW-3051
> URL: https://issues.apache.org/jira/browse/ARROW-3051
> Project: Apache Arrow
>  Issue Type: Improvement
>  Components: C++
>Reporter: Wes McKinney
>Priority: Major
> Fix For: 0.11.0
>
>
> Just saw this patch, worth investigating: 
> https://github.com/apache/impala/commit/ea615d1d8026dbe1cda3f5c2b048d210b2df435b



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (ARROW-3051) [C++] Status performance optimization from Impala/Kudu

2018-08-14 Thread Dimitri Vorona (JIRA)


[ 
https://issues.apache.org/jira/browse/ARROW-3051?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16580379#comment-16580379
 ] 

Dimitri Vorona edited comment on ARROW-3051 at 8/14/18 8:21 PM:


In that case copy-elision won't work even with the change  
[http://cpp.sh/3x25h] . Even worse: while using const reference with temporary 
gives a correct behaviour, it disables RVO, since it isn't specified to work on 
references (see returnNoisy[2-4]).

 


was (Author: alendit):
In that case copy-elision won't work either  [http://cpp.sh/3x25h] . Even 
worse: while using const reference with temporary gives a correct behaviour, it 
disables RVO, since it isn't specified to work on references (see 
returnNoisy[2-4]).

 

> [C++] Status performance optimization from Impala/Kudu
> --
>
> Key: ARROW-3051
> URL: https://issues.apache.org/jira/browse/ARROW-3051
> Project: Apache Arrow
>  Issue Type: Improvement
>  Components: C++
>Reporter: Wes McKinney
>Priority: Major
> Fix For: 0.11.0
>
>
> Just saw this patch, worth investigating: 
> https://github.com/apache/impala/commit/ea615d1d8026dbe1cda3f5c2b048d210b2df435b



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)