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

Micah Kornfield commented on ARROW-7754:
----------------------------------------

I'm sorry it is that much slower it is probably due to as Antoine points out to 
using a variant instead of managing some of the state manually.  May I ask 
which function it was?

 

I agree performance critical functions probably shouldn't use result (and 
probably not even status as a return type).

> [C++] Result<T> is slow
> -----------------------
>
>                 Key: ARROW-7754
>                 URL: https://issues.apache.org/jira/browse/ARROW-7754
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: C++
>            Reporter: Antoine Pitrou
>            Assignee: Antoine Pitrou
>            Priority: Major
>
> When converting a short performance-critical function to return a Result 
> (instead of returning a Status and filling a out-parameter), I noticed a 
> catastrophic performance regression (around 2x or 3x slower).
> It seems the current Result implementation is very slow, for several reasons:
> - it imposes "safety" features even in release mode, for example on the 
> critical path of move operators
> - the underlying mpark variant implementation is not optimized for 
> performance-critical data structures



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to