You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "pitrou (via GitHub)" <gi...@apache.org> on 2025/09/24 10:09:42 UTC

[PR] [C++][Benchmarks] Experiment with CMAKE_INTERPROCEDURAL_OPTIMIZATION [arrow]

pitrou opened a new pull request, #47637:
URL: https://github.com/apache/arrow/pull/47637

   Thanks for opening a pull request!
   
   If this is your first pull request you can find detailed information on how to contribute here:
   
     * [New Contributor's Guide](https://arrow.apache.org/docs/dev/developers/guide/step_by_step/pr_lifecycle.html#reviews-and-merge-of-the-pull-request)
     * [Contributing Overview](https://arrow.apache.org/docs/dev/developers/overview.html)
   
   Please remove this line and the above text before creating your pull request.
   
   ### Rationale for this change
   
   ### What changes are included in this PR?
   
   ### Are these changes tested?
   
   ### Are there any user-facing changes?
   
   **This PR includes breaking changes to public APIs.** (If there are any breaking changes to public APIs, please explain which changes are breaking. If not, you can remove this.)
   
   **This PR contains a "Critical Fix".** (If the changes fix either (a) a security vulnerability, (b) a bug that caused incorrect or invalid data to be produced, or (c) a bug that causes a crash (even when the API contract is upheld), please provide explanation. If not, you can remove this.)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [C++][Benchmarks] Experiment with CMAKE_INTERPROCEDURAL_OPTIMIZATION [arrow]

Posted by "voltrondatabot (via GitHub)" <gi...@apache.org>.
voltrondatabot commented on PR #47637:
URL: https://github.com/apache/arrow/pull/47637#issuecomment-3328524025

   Benchmark runs are scheduled for commit bf2698a9024d657083ae947c132a5fb1c41e1b3a. Watch https://buildkite.com/apache-arrow and https://conbench.ursa.dev for updates. A comment will be posted here when the runs are complete.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [C++][Benchmarks] Experiment with CMAKE_INTERPROCEDURAL_OPTIMIZATION [arrow]

Posted by "conbench-apache-arrow[bot] (via GitHub)" <gi...@apache.org>.
conbench-apache-arrow[bot] commented on PR #47637:
URL: https://github.com/apache/arrow/pull/47637#issuecomment-3330757012

   Thanks for your patience. Conbench analyzed the 3 benchmarking runs that have been run so far on PR commit bf2698a9024d657083ae947c132a5fb1c41e1b3a.
   
   There were 33 benchmark results indicating a performance regression:
   
   - Pull Request Run on `arm64-t4g-2xlarge-linux` at [2025-09-24 17:58:41Z](https://conbench.ursa.dev/compare/runs/637047ac713040b08721454986679af8...4539b757e96e4490b0f28b8fbb2b337e/)
     - [`CopyEmptyVector` (C++) with params=<STATIC_VECTOR(std::string)>, source=cpp-micro, suite=arrow-small-vector-benchmark](https://conbench.ursa.dev/compare/benchmarks/068d3df7b3c7781a8000432e2c602812...068d431bddd87d7d80000c390e165831)
     - [`CopyShortVector` (C++) with params=<STD_VECTOR(int)>, source=cpp-micro, suite=arrow-small-vector-benchmark](https://conbench.ursa.dev/compare/benchmarks/068d3df7b87f790a8000e59b6a690bb2...068d431be2de70138000d5e0caec18d4)
   - and 31 more (see the report linked below)
   
   The [full Conbench report](https://github.com/apache/arrow/runs/51177631486) has more details.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [C++][Benchmarks] Experiment with CMAKE_INTERPROCEDURAL_OPTIMIZATION [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on PR #47637:
URL: https://github.com/apache/arrow/pull/47637#issuecomment-3327583765

   @ursabot please benchmark


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [C++][Benchmarks] Experiment with CMAKE_INTERPROCEDURAL_OPTIMIZATION [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on PR #47637:
URL: https://github.com/apache/arrow/pull/47637#issuecomment-3329542409

   Also, I was surprised that, at least with gcc 14.3.0, build times do not seem to increase significantly with `CMAKE_INTERPROCEDURAL_OPTIMIZATION` enabled. So perhaps gcc is already using some equivalent of clang's "thin LTO".


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [C++][Benchmarks] Experiment with CMAKE_INTERPROCEDURAL_OPTIMIZATION [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on PR #47637:
URL: https://github.com/apache/arrow/pull/47637#issuecomment-3328912558

   I'm trying this locally, also using conda-forge and therefore the same toolchain. One interesting aspect is that IPO seems to decrease total library size, perhaps by removing unused private functions and data:
   * before:
   ```console
   $ size -G /build/build-release/relwithdebinfo/*.so
         text       data        bss      total filename
      1231288     436476       1080    1668844 /build/build-release/relwithdebinfo/libarrow_acero.so
     11719000    2076782      46232   13842014 /build/build-release/relwithdebinfo/libarrow_compute.so
      1029085     613682       3496    1646263 /build/build-release/relwithdebinfo/libarrow_dataset.so
     11368776    3895932    2181849   17446557 /build/build-release/relwithdebinfo/libarrow.so
      1010359     500136       1992    1512487 /build/build-release/relwithdebinfo/libarrow_testing.so
      2675915    1510609       6328    4192852 /build/build-release/relwithdebinfo/libparquet.so
   ```
   * after:
   ```console
   $ size -G /build/build-release/relwithdebinfo/*.so
         text       data        bss      total filename
       971243     380629       1552    1353424 /build/build-release/relwithdebinfo/libarrow_acero.so
     11764472    1924230      46440   13735142 /build/build-release/relwithdebinfo/libarrow_compute.so
       911885     500747       4328    1416960 /build/build-release/relwithdebinfo/libarrow_dataset.so
     10306362    3473709    2183392   15963463 /build/build-release/relwithdebinfo/libarrow.so
       954794     439139       3968    1397901 /build/build-release/relwithdebinfo/libarrow_testing.so
      2446829    1344558       4128    3795515 /build/build-release/relwithdebinfo/libparquet.so
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [C++][Benchmarks] Experiment with CMAKE_INTERPROCEDURAL_OPTIMIZATION [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on PR #47637:
URL: https://github.com/apache/arrow/pull/47637#issuecomment-3329200093

   I ran two sets of benchmark locally and the results are roughly similar to those on the conbench machines:
   * Parquet benchmarks: https://gist.github.com/pitrou/b20fae69d72933dd82f066f64af54e99
   * Compute benchmarks: https://gist.github.com/pitrou/132a23457713775697253ca8d54de408


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [C++][Benchmarks] Experiment with CMAKE_INTERPROCEDURAL_OPTIMIZATION [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on PR #47637:
URL: https://github.com/apache/arrow/pull/47637#issuecomment-3328812300

   Note: a caveat of the conbench benchmarks results is that they all use the conda-forge toolchain, including the same compiler (gcc 14.3.0).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [C++][Benchmarks] Experiment with CMAKE_INTERPROCEDURAL_OPTIMIZATION [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on PR #47637:
URL: https://github.com/apache/arrow/pull/47637#issuecomment-3385673183

   Ok, this PR validates that IPO can be useful. I'm going to close now.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [C++][Benchmarks] Experiment with CMAKE_INTERPROCEDURAL_OPTIMIZATION [arrow]

Posted by "conbench-apache-arrow[bot] (via GitHub)" <gi...@apache.org>.
conbench-apache-arrow[bot] commented on PR #47637:
URL: https://github.com/apache/arrow/pull/47637#issuecomment-3329851688

   Thanks for your patience. Conbench analyzed the 3 benchmarking runs that have been run so far on PR commit 41f441af34b8dbcc9e25c5e2a374bca853e0414e.
   
   There were 31 benchmark results indicating a performance regression:
   
   - Pull Request Run on `amd64-c6a-4xlarge-linux` at [2025-09-24 11:15:34Z](https://conbench.ursa.dev/compare/runs/e2d6041dfc2040a0b1c622bf3e8f6e48...dcd14a87a14647078e3fa6ef5b8f241b/)
     - [`MaxElementWiseArrayScalarString` (C++) with params=32768/2, source=cpp-micro, suite=arrow-compute-scalar-compare-benchmark](https://conbench.ursa.dev/compare/benchmarks/068d3b1c805f747c8000fcc8a8cb8a53...068d3d37e871738c80006f09cb61c4fa)
     - [`SetBitRunReader` (C++) with params=50, source=cpp-micro, suite=arrow-bit-util-benchmark](https://conbench.ursa.dev/compare/benchmarks/068d3b203f0970888000ab8c00f55234...068d3d3ce6b97fd88000f3d5c325c1e0)
   - and 29 more (see the report linked below)
   
   The [full Conbench report](https://github.com/apache/arrow/runs/51156330383) has more details.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [C++][Benchmarks] Experiment with CMAKE_INTERPROCEDURAL_OPTIMIZATION [arrow]

Posted by "WillAyd (via GitHub)" <gi...@apache.org>.
WillAyd commented on PR #47637:
URL: https://github.com/apache/arrow/pull/47637#issuecomment-3329519135

   I see that CMake also has a "thin" LTO type that may offer improvements over the default LTO 
   
   https://clang.llvm.org/docs/ThinLTO.html
   https://blog.llvm.org/2016/06/thinlto-scalable-and-incremental-lto.html
   
   Do we know if this enabled by CMake through this option, or would it be an additional option to benchmark?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [C++][Benchmarks] Experiment with CMAKE_INTERPROCEDURAL_OPTIMIZATION [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on PR #47637:
URL: https://github.com/apache/arrow/pull/47637#issuecomment-3329530705

   I have no idea, but the benchmarks here use gcc.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [C++][Benchmarks] Experiment with CMAKE_INTERPROCEDURAL_OPTIMIZATION [arrow]

Posted by "voltrondatabot (via GitHub)" <gi...@apache.org>.
voltrondatabot commented on PR #47637:
URL: https://github.com/apache/arrow/pull/47637#issuecomment-3327584216

   Benchmark runs are scheduled for commit 41f441af34b8dbcc9e25c5e2a374bca853e0414e. Watch https://buildkite.com/apache-arrow and https://conbench.ursa.dev for updates. A comment will be posted here when the runs are complete.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [C++][Benchmarks] Experiment with CMAKE_INTERPROCEDURAL_OPTIMIZATION [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on PR #47637:
URL: https://github.com/apache/arrow/pull/47637#issuecomment-3327586538

   @AntoinePrv This is trying to run the benchmarks with IPO to see if it makes a significant difference.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [C++][Benchmarks] Experiment with CMAKE_INTERPROCEDURAL_OPTIMIZATION [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou closed pull request #47637: [C++][Benchmarks] Experiment with CMAKE_INTERPROCEDURAL_OPTIMIZATION
URL: https://github.com/apache/arrow/pull/47637


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [C++][Benchmarks] Experiment with CMAKE_INTERPROCEDURAL_OPTIMIZATION [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on PR #47637:
URL: https://github.com/apache/arrow/pull/47637#issuecomment-3328232725

   Looks like we miss `ar` and `ranlib` on macOS. https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-test-mac-arm/builds/7320/steps/canvas?sid=01997b83-cbd5-4f86-8d2c-dfe8315e630a#01997b83-cc32-46ad-b680-38fbc1e59ab1/34-1341
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [C++][Benchmarks] Experiment with CMAKE_INTERPROCEDURAL_OPTIMIZATION [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on PR #47637:
URL: https://github.com/apache/arrow/pull/47637#issuecomment-3328523358

   @ursabot please benchmark lang=C++


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org