Optimizer calls getenv
on every optimization run
#116772
Labels
interpreter-core
(Objects, Python, Grammar, and Parser dirs)
performance
Performance or resource usage
type-bug
An unexpected behavior, bug, or error
Bug report
Bug description:
The optimizer currently calls
getenv
during every optimization attempt. This has a small, but statistically significant 0.5% impact on performance. Do we need to do this each time, or could we read it to a flag during initialization?CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs
getenv
result inoptimizer.c
to reduce calls #126439The text was updated successfully, but these errors were encountered: