Skip to content

Lab: Communicator Lifecycle

Show why communicators and registered buffers should be created once and reused.

The baseline recreates communication state for every step.

The optimized path pays setup once, then reuses the communicator across steps.

Terminal window
python compare.py

The optimized path should have the same output with much lower per-step overhead.