Skip to content

Relative speed test that catches significant slowdowns - #63

Merged
AlbanSagouis merged 7 commits into
devfrom
test/relative-benchmark
Nov 19, 2026
Merged

AlbanSagouis merged 7 commits into
devfrom
test/relative-benchmark

Conversation

@AlbanSagouis

@AlbanSagouis AlbanSagouis commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Adds a relative speed test for parse_lat(), parse_lon() and parse_llstr(): the median time on 10k strings divided by the median time of gsub("[^0-9A-Za-z.]", "'", x) on the same strings, in the same run. It runs only inside R CMD check (testthat::is_checking(), an installed optimised build) and is skipped on CRAN.

The limits (6, 6 and 8) are 1.5 times the ratios measured on the 5 CI platforms in this PR. Windows is the worst (3.86, 3.85, 5.03), macOS the best (1.59, 2.06, 3.03). The tests catch a slowdown of about 1.6x on Windows and 3.4x or more on macOS. The std::regex version (aacd37b) gives 20 to 34.

@AlbanSagouis
AlbanSagouis marked this pull request as ready for review November 19, 2026 10:51
@AlbanSagouis AlbanSagouis changed the title Relative speed test that catches moderate slowdowns Relative speed test that catches significant slowdowns Nov 19, 2026
@AlbanSagouis
AlbanSagouis merged commit c1f2937 into dev Nov 19, 2026
5 checks passed
@AlbanSagouis
AlbanSagouis deleted the test/relative-benchmark branch November 19, 2026 11:19
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