Skip to content

Conversation

@ZacBlanco
Copy link
Collaborator

@ZacBlanco ZacBlanco commented Dec 15, 2025

What problem does this PR solve?

Reduce memory consumption during compilation by splitting files with large use of templates.

Some registration files exceed 10GB of memory and 5 minutes of compilation time due to extensive use of templates. By splitting the function registrations across more files it reduces memory consumption. It can also help stabilize the build in memory-constrained environments and speed up end-to-end build times

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 🚀 Performance improvement (optimization)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)
  • 🔨 Refactoring (no logic changes)
  • 🔧 Build/CI or Infrastructure changes
  • 📝 Documentation only

Description

Files in registration for math and datetime functions are now split into multiple separate files with individual registraiton functions. The individual registrations are then called in the original files.

No functions should be added or removed.

Release Note

N/A

Checklist (For Author)

  • I have added/updated unit tests (ctest).
  • I have verified the code with local build (Release/Debug).
  • I have run clang-format / linters.
  • (Optional) I have run Sanitizers (ASAN/TSAN) locally for complex C++ changes.
  • No need to test or manual test.

Breaking Changes

  • No
  • Yes (Description: ...)

Helps make the build more stable by not ballooning memory on this one file.

Most of the compilation time is due to heavy use of
templates. Since we don't intend to change the registration process, just split this into smaller files
Restructure arithmetic function registrations into a more organized hierarchy with clear categories. Replace individual registration calls with a unified registerArithmeticFunctions interface.

The changes include:
- Renaming and reorganizing registration files by arithmetic categories
- Make ArithmeticFunctionsRegistration.cpp the main entry point
…le file

Move all math function registrations from separate files into RegisterMath.cpp to simplify maintenance and improve code organization
@ZacBlanco ZacBlanco force-pushed the func-registration.patch branch 2 times, most recently from c8cc1f7 to 5ad1fa6 Compare December 16, 2025 17:38
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.

1 participant