Skip to content

Conversation

@moreati
Copy link
Member

@moreati moreati commented Jan 16, 2026

mitogen git:(compression-level) ✗ time env MITOGEN_COMPRESSION_LEVEL=9 python3.14 hello_local.py
42
env MITOGEN_COMPRESSION_LEVEL=9 python3.14 hello_local.py  0.20s user 0.03s system 81% cpu 0.275 totalmitogen git:(compression-level) ✗ time env MITOGEN_COMPRESSION_LEVEL=1 python3.14 hello_local.py
42
env MITOGEN_COMPRESSION_LEVEL=1 python3.14 hello_local.py  0.19s user 0.03s system 80% cpu 0.264 total

@moreati
Copy link
Member Author

moreati commented Jan 22, 2026

Looks like it makes little to no difference in a barebones benchmark

mitogen git:(compression-level) ✗ hyperfine --warmup 1 -L level 0,1,6,9 'MITOGEN_COMPRESSION_LEVEL={level} python2 hello_local2.py'
Benchmark 1: MITOGEN_COMPRESSION_LEVEL=0 python2 hello_local2.py
  Time (mean ± σ):     695.6 ms ±   6.0 ms    [User: 502.4 ms, System: 121.3 ms]
  Range (min … max):   686.8 ms … 707.7 ms    10 runs
 
Benchmark 2: MITOGEN_COMPRESSION_LEVEL=1 python2 hello_local2.py
  Time (mean ± σ):     694.9 ms ±   3.9 ms    [User: 503.9 ms, System: 120.1 ms]
  Range (min … max):   691.2 ms … 703.5 ms    10 runs
 
Benchmark 3: MITOGEN_COMPRESSION_LEVEL=6 python2 hello_local2.py
  Time (mean ± σ):     696.7 ms ±   7.7 ms    [User: 506.7 ms, System: 120.2 ms]
  Range (min … max):   688.2 ms … 710.2 ms    10 runs
 
Benchmark 4: MITOGEN_COMPRESSION_LEVEL=9 python2 hello_local2.py
  Time (mean ± σ):     699.6 ms ±   5.9 ms    [User: 509.3 ms, System: 120.4 ms]
  Range (min … max):   693.4 ms … 713.9 ms    10 runs
 
Summary
  MITOGEN_COMPRESSION_LEVEL=1 python2 hello_local2.py ran
    1.00 ± 0.01 times faster than MITOGEN_COMPRESSION_LEVEL=0 python2 hello_local2.py
    1.00 ± 0.01 times faster than MITOGEN_COMPRESSION_LEVEL=6 python2 hello_local2.py
    1.01 ± 0.01 times faster than MITOGEN_COMPRESSION_LEVEL=9 python2 hello_local2.py
mitogen git:(compression-level) ✗ hyperfine --warmup 1 -L level 0,1,6,9 'MITOGEN_COMPRESSION_LEVEL={level} python3.14 hello_local2.py'         
Benchmark 1: MITOGEN_COMPRESSION_LEVEL=0 python3.14 hello_local2.py
  Time (mean ± σ):     185.2 ms ±   2.3 ms    [User: 112.6 ms, System: 20.9 ms]
  Range (min … max):   182.4 ms … 190.1 ms    15 runs
 
Benchmark 2: MITOGEN_COMPRESSION_LEVEL=1 python3.14 hello_local2.py
  Time (mean ± σ):     184.2 ms ±   1.9 ms    [User: 112.5 ms, System: 20.4 ms]
  Range (min … max):   180.4 ms … 187.8 ms    15 runs
 
Benchmark 3: MITOGEN_COMPRESSION_LEVEL=6 python3.14 hello_local2.py
  Time (mean ± σ):     185.6 ms ±   1.2 ms    [User: 115.0 ms, System: 20.6 ms]
  Range (min … max):   182.9 ms … 187.2 ms    15 runs
 
Benchmark 4: MITOGEN_COMPRESSION_LEVEL=9 python3.14 hello_local2.py
  Time (mean ± σ):     189.6 ms ±   1.7 ms    [User: 119.1 ms, System: 20.6 ms]
  Range (min … max):   186.1 ms … 192.7 ms    15 runs
 
Summary
  MITOGEN_COMPRESSION_LEVEL=1 python3.14 hello_local2.py ran
    1.01 ± 0.02 times faster than MITOGEN_COMPRESSION_LEVEL=0 python3.14 hello_local2.py
    1.01 ± 0.01 times faster than MITOGEN_COMPRESSION_LEVEL=6 python3.14 hello_local2.py
    1.03 ± 0.01 times faster than MITOGEN_COMPRESSION_LEVEL=9 python3.14 hello_local2.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant