-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Python bindings: Avoid linear scan in gdal_array.NumericTypeCodeToGDA…
…LTypeCode (#10694) Avoids a surprisingly expensive lookup in gdal_array.NumericTypeCodeToGDALTypeCode. This was showing up in profiling of a script that calls ReadAsArray many times; these changes improve total script runtime by ~10%. I re-implemented the function flip_code because I saw it used in the wild: https://github.com/search?q=gdal_array.flip_code&type=code
- Loading branch information
Showing
2 changed files
with
41 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters