[
https://issues.apache.org/jira/browse/ARROW-2400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16426908#comment-16426908
]
Dimitri Vorona edited comment on ARROW-2400 at 4/5/18 1:19 PM:
---------------------------------------------------------------
With the predict patch
([https://gist.github.com/alendit/73ec62887d00fb44ef32e8f8eec41af3])
{noformat}
Run on (4 X 3200 MHz CPU s)
2018-04-05 15:16:29
--------------------------------------------------------
Benchmark Time CPU Iterations
--------------------------------------------------------
BM_ArrowStatus 657 ns 654 ns 1037970
BM_OwnCopyStatus 657 ns 655 ns 1080042
BM_NoOpStatus 330 ns 329 ns 2131999
BM_PredictStatus 448 ns 446 ns 1642423{noformat}
No changes on clang.
was (Author: alendit):
With the predict patch
(https://gist.github.com/alendit/73ec62887d00fb44ef32e8f8eec41af3)
{noformat}
Run on (4 X 3200 MHz CPU s)
2018-04-05 15:16:29
--------------------------------------------------------
Benchmark Time CPU Iterations
--------------------------------------------------------
BM_ArrowStatus 657 ns 654 ns 1037970
BM_OwnCopyStatus 657 ns 655 ns 1080042
BM_NoOpStatus 330 ns 329 ns 2131999
BM_PredictStatus 448 ns 446 ns 1642423{noformat}
> [C++] Status destructor is expensive
> ------------------------------------
>
> Key: ARROW-2400
> URL: https://issues.apache.org/jira/browse/ARROW-2400
> Project: Apache Arrow
> Issue Type: Improvement
> Affects Versions: 0.9.0
> Reporter: Antoine Pitrou
> Priority: Major
>
> Let's take the following micro-benchmark (in Python):
> {code:bash}
> $ python -m timeit -s "import pyarrow as pa; data = [b'xx' for i in
> range(10000)]" "pa.array(data, type=pa.binary())"
> 1000 loops, best of 3: 784 usec per loop
> {code}
> If I replace the Status destructor with a no-op:
> {code:c++}
> ~Status() { }
> {code}
> then the benchmark result becomes:
> {code:bash}
> $ python -m timeit -s "import pyarrow as pa; data = [b'xx' for i in
> range(10000)]" "pa.array(data, type=pa.binary())"
> 1000 loops, best of 3: 561 usec per loop
> {code}
> This is almost a 30% win. I get similar results on the conversion benchmarks
> in the benchmark suite.
> I'm unsure about the explanation. In the common case, {{delete _state}}
> should be extremely fast, since the state is NULL. Yet, it seems it adds
> significant overhead. Perhaps because of exception handling?
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)