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.
| name
| bench
| .text
| Δ bench
| Δ .text
|
|:-------------------|------------:|---------:|------------:|---------:|
| cmpnullvoid | 1.754 kc | 323 kib | 0.000 kc | 0 kib |
| cmpfloodtide | 6.654 kc | 377 kib | 4.900 kc | 54 kib |
| cmpgumdrop | 14.244 kc | 477 kib | 12.490 kc | 153 kib |
| cmppurerust | 16.439 kc | 389 kib | 14.685 kc | 66 kib |
| cmpargh | 26.279 kc | 409 kib | 24.525 kc | 85 kib |
| cmppicoargs | 156.589 kc | 421 kib | 154.835 kc | 98 kib |
| cmprustop | 439.899 kc | 498 kib | 438.145 kc | 175 kib |
| cmpclap | 562.743 kc | 942 kib | 560.989 kc | 618 kib |
| cmpstructopt | 676.121 kc | 1023 kib | 674.367 kc | 700 kib |
| cmpgetopts | 697.585 kc | 412 kib | 695.831 kc | 89 kib |
| cmpcommander | 762.846 kc | 424 kib | 761.092 kc | 100 kib |
| cmplapp | 1109.102 kc | 464 kib | 1107.348 kc | 140 kib |
| cmpargs | 2064.578 kc | 464 kib | 2062.824 kc | 140 kib |
| cmpapp | 2379.029 kc | 714 kib | 2377.275 kc | 390 kib |
| cmp_docopt | 5714.188 kc | 1694 kib | 5712.434 kc | 1370 kib |
us
is micro seconds.text
is elf .text section sizeΔ
(delta) is the difference from cmpnullvoidcmp_null_void
is non parser, support only --help
and --version
cmp_pure_rust
is newly written with sting match