[SciPy-dev] Splitting sparsetools_wrap source file ?

Robert Kern robert.kern@gmail....
Sat Mar 8 23:36:32 CST 2008

On Sat, Mar 8, 2008 at 10:52 PM, David Cournapeau
<david@ar.media.kyoto-u.ac.jp> wrote:
> Robert Kern wrote:
>  >
>  > Bascially, no. You would have to split up the extension module itself,
>  > and that could be difficult. sparsetools_wrap.cxx is generated by
>  > SWIG.
>  >
>  >
>  I know it is generated by swig. But from a quick look to the swig
>  interface file, it looks like sparsetools is just a bunch of utilities
>  functions, which could be split up, no ? For example, one swig generated
>  file per function should be possible, without too much trouble ? Sorry
>  if this is stupid, I have not been using swig for a while, so I do not
>  remember how it works.

If anything that would just exacerbate the problem. All of the SWIG
utility functions would be repeated for each module. In any case, I
split the file into 2 and the total time for compiling both is about
the same as as compiling the current sparsetools_wrap.cxx. This would
be a win for parallel builds, but until numscons is the official build
system, I'm against making changes as invasive as splitting up an
extension module just to optimize for that.

Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco

More information about the Scipy-dev mailing list