mirror of
https://github.com/kennethreitz/pytheory.git
synced 2026-06-21 15:00:57 +00:00
b68cec889f
A single render_score is already fast, so the multicore win is in batch work: exporting an album, rendering many clips, serving several requests. render_scores(scores, workers=) renders each Score independently on its own thread; NumPy releases the GIL during the heavy math, so it scales ~2x on a typical machine with zero change to how any Score sounds. (Within-a-single-render parallelism was measured and rejected: renders are already ~0.2s and the process-pool spawn + buffer serialization overhead made it slower, on audio-critical, non-deterministic code.) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>