alamb commented on PR #10893:
URL: https://github.com/apache/arrow-rs/pull/10893#issuecomment-5451969875

   I re-ran the binary size tests with the updated change (inner-function 
version, 6102547236) and the results are essentially the same as before:
   
   **Binary size** (`cargo bench --bench cast_kernels --no-run`):
   
   | before | after | delta |
   |---:|---:|---:|
   | 13,232,256 bytes | 13,188,848 bytes | **−43,408 bytes (−0.33%)** |
   
   **LLVM IR** (`cargo llvm-lines --release -p arrow-row --lib`, 
`From<PrimitiveArray<T>> for ArrayData`):
   
   | before | after | delta |
   |---|---:|---:|
   | 4,992 lines / 32 copies (156 lines each) | 1,952 lines / 32 thin shims (61 
lines each) | **−61%** |
   
   So moving the helper to a non-generic inner function (and marking it 
`unsafe`) preserves the monomorphization savings.


-- 
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