Skip to content

Conversation

@prabhuramachandran
Copy link
Contributor

  • Instead of using -O2 by default we now use -O3 for all Cython compilations. This can provide better performance with gcc.
  • Always use cdivision=True for Cython code which leads to large improvements for Cython code performance.
  • Add a COMPYLE_DEBUG env var option which makes it easier to debug.

- Instead of using -O2 by default we now use -O3 for all Cython
  compilations. This can provide better performance with gcc.
- Always use cdivision=True for Cython code which leads to large
  improvements for Cython code performance.
- Add a `COMPYLE_DEBUG` env var option which makes it easier to debug.
self.blocks = []
self.mod = None
self._use_double = get_config().use_double
if os.environ.get('COMPYLE_DEBUG') is not None:
Copy link
Contributor

@nauaneed nauaneed Apr 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think, this will evaluate to True even if COMPYLE_DEBUG=0 or COMPYLE_DEBUG=False.

Copy link
Contributor

@nauaneed nauaneed Apr 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe os.environ.get("COMPYLE_DEBUG", 'False').lower() in ['true', '1']

Copy link
Contributor

@nauaneed nauaneed Apr 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could also use pydantic or attrs, I guess, but adds a dependency.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is intentional, at this point if the variable exists and is set it will treat it, if someone doesn't want it, they can unset the variable.

@prabhuramachandran prabhuramachandran merged commit 149bfc5 into master Apr 3, 2025
6 checks passed
@prabhuramachandran prabhuramachandran deleted the misc-improvements branch April 3, 2025 09:04
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.

3 participants