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.
with click:
with argparse:
argparse after stat optimisations:
running without any parsing at all (baseline):
custom implementation, similar to getopt:
click is faster than using argparse, it would seem.
getopt
has much lower figures, close to that of the baseline (average0.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.