Move the greenlet tracers to their own file and compile with cython.
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%) | +-------------------+-----------------+------------------------------+
Showing
src/gevent/_tracer.py
0 → 100644
Please register or sign in to comment