Skip to content

[FR]: Preallocate tiles with NumPy arrays for better performance and code clarity #280

@jdbcode

Description

@jdbcode

Feature Summary

Replace nested list pre-allocation of 'tiles' with NumPy arrays using np.empty(shape, dtype=object). Update all tile access patterns from tiles[i][j][k] to tiles[i, j, k] for consistency and improved code readability.

Use Cases

  • Enables more pythonic and efficient handling of multi-dimensional tiles and blocks.
  • Reduces memory allocation overhead and potentially improves execution performance.
  • Makes tile-based operations more readable and maintainable, especially for future features dependent on array shape.
  • Cleaner integration of code with scientific Python ecosystem and facilitates future optimizations leveraging NumPy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions