• Jason Madden's avatar
    Move the greenlet tracers to their own file and compile with cython. · 4231079a
    Jason Madden authored
    Unoptimized still makes them 25% faster:
    
    +-------------------+-----------------+------------------------------+
    | Benchmark         | 37_bench_tracer | 37_bench_tracer_first_cython |
    +===================+=================+==============================+
    | trivial tracer    | 792 ns          | 786 ns: 1.01x faster (-1%)   |
    +-------------------+-----------------+------------------------------+
    | monitor tracer    | 1.62 us         | 1.24 us: 1.31x faster (-24%) |
    +-------------------+-----------------+------------------------------+
    | max switch tracer | 3.06 us         | 1.89 us: 1.62x faster (-38%) |
    +-------------------+-----------------+------------------------------+
    | hub switch tracer | 2.16 us         | 1.68 us: 1.29x faster (-22%) |
    +-------------------+-----------------+------------------------------+
    4231079a
bench_tracer.py 2.21 KB