matusvalo commented on issue #40166:
URL: https://github.com/apache/arrow/issues/40166#issuecomment-5246440249

   FYI there is a feature in Cython which allows compiling shared utility code 
in separate file [1]. This should help with compilation time and also with 
resulting binary size. Cython 3.2 already supports shared utility code 
generation, but 3.3 allows specifying which "features" should be embedded to 
shared utility library [2] which helps with resulting shared utility file size, 
mainly if you are not using memoryviews which tends to have chubby utility 
code. As an example, scipy already uses shared utility code [3] and cython 
internally started using it too [4].
   
   Maybe it will help you with compilation time and resulting binary size, but 
it needs to be measured to be sure whether you will benefit from it...
   
   
   [1] 
https://cython.readthedocs.io/en/latest/src/userguide/source_files_and_compilation.html#shared-utility-module
   [2] 
https://cython.readthedocs.io/en/latest/src/userguide/source_files_and_compilation.html#selecting-features-to-be-shared
   [3] 
https://github.com/scipy/scipy/blob/415cda2816abfd3e927f033abc4311aa61051ab5/scipy/meson.build#L478-L495
   [4] 
https://github.com/cython/cython/blob/51a460b7d704eb11b6f47abe7983c816d0b77129/setup.py#L197-L207


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