clap aims to be extremely fast and efficient. Arguments will be parsed without wasting CPU cycles or hogging memory.

Because let’s face it, your application is the star of the show!

How fast? In the benches repository of the project, you will find a mock up of a popular command line tool which contains many, many options, switches/flags, validation layers, and then parses a very complex set of arguments using most of clap’s features. This parse takes ~0.019 ms on a laptop i7-6700k! Yes, that’s around two-one-hundredths of a millisecond.

If you already have Rust installed and want to run the benchmarks for yourself to compare, run the following commands after cloning the clap repository to your local machine:

Note: the benchmarks need to be run using a Nightly Rust compiler.

There are many more benchmarks to play around with if you’d like to see a workload more tailored to your specific use case.