Compile the monitor greenlet tracer with Cython.
This makes things 54% faster. In fact, the monitor tracer is now faster than a trivial tracer implemented in python (settrace(lambda e, a: None)). +-------------------+-----------------+-----------------------------+ | Benchmark | 37_bench_tracer | 37_bench_tracer_cython_opt3 | +===================+=================+=============================+ | monitor tracer | 1.62 us | 739 ns: 2.20x faster (-54%) | +-------------------+-----------------+-----------------------------+ | max switch tracer | 3.06 us | 874 ns: 3.50x faster (-71%) | +-------------------+-----------------+-----------------------------+ | hub switch tracer | 2.16 us | 815 ns: 2.66x faster (-62%) | +-------------------+-----------------+-----------------------------+ Not significant (2): no tracer; trivial tracer
Showing
src/gevent/__tracer.pxd
0 → 100644
Please register or sign in to comment