• Kirill Smelkov's avatar
    pyx api: Provide go · f971a2a8
    Kirill Smelkov authored
    - Add go functionality to libgolang runtime;
    - Implement go for thread and gevent runtimes.
    
      * Thread runtime uses PyThread_start_new_thread which, if used
        carefully, does not depend on Python GIL and on e.g. POSIX reduces to
        tiny wrapper around pthread_create.
    
      * Gevent runtime uses gevent's Greenlet in Pyx mode. This turns
        gevent to be a build-time dependency.
    
    - Provide low-level _taskgo in C client API;
    - Provide type-safe C++-level go wrapper over _taskgo;
    - Switch golang.go from py implementation into Pyx wrapper over
      Pyx/nogil API.
    
    This is the first patch that adds Pyx/C++/C-level unit tests and hooks
    them into golang_test.py .
    
    This patch brings the following speedup to Python-level interface:
    
     (on i7@2.6GHz)
    
    thread runtime:
    
        name             old time/op  new time/op  delta
        go               93.0µs ± 1%  26.6µs ± 1%  -71.41%  (p=0.000 n=10+10)
        chan             13.6µs ± 2%  13.7µs ± 1%     ~     (p=0.280 n=10+10)
        select           29.9...
    f971a2a8
.gitignore 42 Bytes