Skip to content

feat(scalar_fields_XZ): Accelerate rotation calculation using Numba#4

Open
HeeneFZ wants to merge 1 commit intooptbrea:mainfrom
HeeneFZ:perf/rotate_numba
Open

feat(scalar_fields_XZ): Accelerate rotation calculation using Numba#4
HeeneFZ wants to merge 1 commit intooptbrea:mainfrom
HeeneFZ:perf/rotate_numba

Conversation

@HeeneFZ
Copy link
Copy Markdown

@HeeneFZ HeeneFZ commented Oct 11, 2025

When dealing with large grids (with dimensions greater than 10k*10k), the time consumption for calculating the rotation matrix significantly increases. To address this, numba is introduced to accelerate pure mathematical operations.

  • Introduce Numba's @njit decorator to accelerate the rotation function
  • Extract the original rotation calculation logic into an independent _rotate_numba function
  • Call the optimized Numba-accelerated function in class methods
  • Maintain original functionality while improving computational performance
  • Add parallel=True and nogil=True parameters to enable parallel computation
  • Preserve the mathematical correctness of the original rotation logic

- Introduce Numba's @njit decorator to accelerate the rotation function
- Extract the original rotation calculation logic into an independent _rotate_numba function
- Call the optimized Numba-accelerated function in class methods
- Maintain original functionality while improving computational performance
- Add parallel=True and nogil=True parameters to enable parallel computation
- Preserve the mathematical correctness of the original rotation logic
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