flood-tide is command line flag and option parse utilities
no_std
and std
are supported.-a
)--long
)-abc
:=: -a
-b
-c
)-long
)--abbr
:=: --abbreviate
)no_std
/a
)in examples directory.
This parser is not a new special idea. It's just comparing characters one by one. Is there anything simpler than this?
The comparing performance and .text size.
| | base raw
| delta
|
| name
| bench
| .text
| bench
| .text
|
|--------------------------|-------------|----------|-------------|----------|
| cmpnullvoid | 1.750 kc | 318 kib | 0.000 kc | 0 kib |
| cmpflood-tide | 6.754 kc | 372 kib | 5.004 kc | 54 kib |
| cmpgumdrop | 14.251 kc | 474 kib | 12.500 kc | 156 kib |
| cmpargh | 26.205 kc | 404 kib | 24.455 kc | 85 kib |
| cmppicoargs | 156.760 kc | 413 kib | 155.010 kc | 94 kib |
| cmprustop | 429.286 kc | 495 kib | 427.536 kc | 177 kib |
| cmpclap | 572.439 kc | 934 kib | 570.688 kc | 616 kib |
| cmpgetopts | 688.350 kc | 408 kib | 686.600 kc | 90 kib |
| cmpstructopt | 714.529 kc | 1015 kib | 712.778 kc | 697 kib |
| cmpcommander | 749.754 kc | 421 kib | 748.004 kc | 102 kib |
| cmplapp | 1130.293 kc | 461 kib | 1128.543 kc | 142 kib |
| cmpargs | 2070.766 kc | 459 kib | 2069.016 kc | 140 kib |
| cmpapp | 2394.380 kc | 707 kib | 2392.630 kc | 388 kib |
| cmpdocopt | 5715.680 kc | 1690 kib | 5713.930 kc | 1371 kib |
us
is micro seconds.text
is elf .text section sizedelta
is the difference from cmpnullvoidcmp_null_void
is non parser, support only --help
and --version
cmp_pure_rust
is newly written with sting match