lriggs commented on issue #48159:
URL: https://github.com/apache/arrow/issues/48159#issuecomment-3573235237

   Some profiling I did.
   
   With the MCJIT engine it create one TargetMachine in llvm:
   <img width="1442" height="721" alt="Image" 
src="https://github.com/user-attachments/assets/2b90a5fc-8df0-4d88-98cc-0533e9b84d0b";
 />
   
   But after the changes to ORCJIT it is creating three:
   
   <img width="1481" height="760" alt="Image" 
src="https://github.com/user-attachments/assets/5353dc93-57ba-4ba0-9aca-0d1de7619828";
 />
   
   My testing and the llvm code seems to indicate this can be resource 
intensive.
   https://llvm.org/doxygen/JITTargetMachineBuilder_8h_source.html says `/// 
Get the default DataLayout for the target.
     ///
     /// Note: This is reasonably expensive, as it creates a temporary
     /// TargetMachine instance under the hood. It is only suitable for use 
during
     /// JIT setup.
     
[Expected<DataLayout>](https://llvm.org/doxygen/classllvm_1_1Expected.html) 
[getDefaultDataLayoutForTarget](https://llvm.org/doxygen/classllvm_1_1orc_1_1JITTargetMachineBuilder.html#aae1a8efd4b4afe6411908938a204fa0b)()
 {`
   
   Only one target machine is created after a proposed refactoring:
   
   <img width="1459" height="841" alt="Image" 
src="https://github.com/user-attachments/assets/fb55ee5e-1706-44f4-8c36-cf84407c6334";
 />
   


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