• Jason Madden's avatar
    Parrellize cythoncpp.py. · 82e3709a
    Jason Madden authored
    On my machine, this cuts the build time by a fourth to a third.
    
    Not ready to merge, submitting for testing on CI (esp Windows).
    
    Cython calls are threaded because they release the GIL.
    
    The most expensive part was merging results, which holds the GIL, so use
    multiprocessing for that. Pre-combine the identical results that we
    expect to get for two sets of defines to reduce the number of merges.
    
    Change internal data structures to be immutable to make debugging this
    easier (and substantially faster when pickling through multiprocessing.)
    82e3709a
cythonpp.py 31.4 KB