haohuaijin commented on PR #10446:
URL: https://github.com/apache/arrow-rs/pull/10446#issuecomment-5207283084

   > So the improvement looks real, but it does not appear to come from the 
redundant-copy removal described in the PR. Could you clarify whether this is a 
cross-crate inlining/codegen effect? One useful way to isolate it would be to 
benchmark &left & &right against a direct from_bitwise_binary_op call on the 
same commit and with the same inputs.
   
   Thanks for the suggestion — I ran the isolation, then took it further with 
LTO. All on `upstream/main`, both variants in one binary, same inputs, 
`codegen-units=1`:
   
   | offsets | variant | no LTO | fat LTO |
   | --- | --- | --- | --- |
   | `(3, 5)` | `&l & &r` | 97.0 µs | 97.3 µs |
   | `(3, 5)` | direct | **25.6 µs** | **97.4 µs** |
   
   At `(3, 5)` both produce byte-identical buffers, and the gap disappears 
under LTO. Thus `equal/diff_mod64` is an artifact of cross-crate codegen, not 
related to this change. (LTO slowing the direct call😂.)
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to