Open HicaroD opened 11 months ago
Those copies can be quite inneficient and it looks useless: https://github.com/Mayitzin/ahrs/blob/761ff0eff022d9b3a0c7e7eb58d0d038c5606355/ahrs/filters/ekf.py#L1107-L1108
Same for magnetometer here: https://github.com/Mayitzin/ahrs/blob/761ff0eff022d9b3a0c7e7eb58d0d038c5606355/ahrs/filters/ekf.py#L1117
I've used Scalene to profile my code which uses ahrs in order to filter sensor data, and I noticed in the left side, more especifically in the yellow column, that I'm doing 13 MB/s of copies in the line where I instantiate EKF.
Scalene
ahrs
EKF
Those copies can be quite inneficient and it looks useless: https://github.com/Mayitzin/ahrs/blob/761ff0eff022d9b3a0c7e7eb58d0d038c5606355/ahrs/filters/ekf.py#L1107-L1108
Same for magnetometer here: https://github.com/Mayitzin/ahrs/blob/761ff0eff022d9b3a0c7e7eb58d0d038c5606355/ahrs/filters/ekf.py#L1117