forked from asmarques/adsb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cpr_nl was returning 0 in some cases, which could lead to panics. This change switches cpr_nl from a trigonometry-based implementation to (essentially) a table lookup. I added a couple unit tests, and a criterion benchmark for cpr_nl to validate the table-based speedup. On my machine this version is, in the worst case situation, 40% faster. In the best case it's 89% faster. ``` cpr_nl_high_lat time: [10.764 ns 10.795 ns 10.830 ns] change: [-40.716% -39.922% -39.255%] (p = 0.00 < 0.05) Performance has improved. cpr_nl_low_lat time: [2.2473 ns 2.2617 ns 2.2767 ns] change: [-89.576% -89.479% -89.386%] (p = 0.00 < 0.05) Performance has improved. ``` Fixes issue asmarques#3.
- Loading branch information
Showing
2 changed files
with
226 additions
and
6 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