amperser / proselint

A linter for prose.
http://proselint.com
BSD 3-Clause "New" or "Revised" License
4.31k stars 177 forks source link

[feature-proposal] never mind #1363

Closed orgua closed 1 month ago

Nytelife26 commented 1 month ago

with click:

CLI initialisation and parsing took 0.00055 s

with argparse:

CLI initialisation and parsing took 0.00112 s

argparse after stat optimisations:

CLI initialisation and parsing took 0.00107 s

running without any parsing at all (baseline):

CLI initialisation and parsing took 0.00002 s

custom implementation, similar to getopt:

CLI initialisation and parsing took 0.00011 s

click is faster than using argparse, it would seem. getopt has much lower figures, close to that of the baseline (average 0.00005 s in my testing), but its implementation details are not very well suited for our purposes. a custom implementation provides a healthy medium, so CLI overhead is now nearly eliminated in the refactor.