Skip to content

Use the -O flag for improved performance in error handling #31

Closed
@adamamer20

Description

@adamamer20

When running a python script with the -O flag, CPython doesn't compile the bytecode of

  • assert
  • if __debug__ code blocks

We might optimize "production-ready" models by converting errors to assertions or raising errors in an if __debug__ code block, while maintaining error handling capabilities during development and debugging.

Metadata

Metadata

Assignees

Labels

Sprints!A task that might be good to tackle during sprints!enhancementImprovements to existing features or performance.good first issueGood for newcomers

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions