• Kirill Smelkov's avatar
    golang: Add benchmarks for nogil go and channels · 2114a560
    Kirill Smelkov authored
    on i7@2.6GHz it looks like:
    
    thread runtime:
    
        name              time/op
        pyx_select_nogil  2.70µs ±13%
        pyx_go_nogil      15.9µs ± 1%
        pyx_chan_nogil    2.79µs ± 2%
        go                17.6µs ± 0%
        chan              3.05µs ± 4%
        select            3.62µs ± 4%
    
    gevent runtime (gevent-1.4.0):
    
        name              time/op
        pyx_select_nogil  9.39µs ± 1%
        pyx_go_nogil      15.1µs ± 2%
        pyx_chan_nogil    7.10µs ± 1%
        go                16.6µs ± 1%
        chan              7.47µs ± 1%
        select            10.7µs ± 0%
    2114a560
_golang_test.pyx 12.7 KB