From cdb6a592dc21ff69728ccf1cefb9350fbc351570 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sun, 11 Feb 2018 14:06:33 +0100 Subject: [PATCH] Add speed comparison to README (#38) --- README.md | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 94b6a745..0ed9f3c4 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,8 @@ [![Circle CI][circle-ci-badge]][circle-ci] [![Crates.io][crates-io-badge]][crates-io] -An implementation of [tldr](https://github.com/tldr-pages/tldr) in Rust: -Simplified, example based and community-driven man pages. +A very fast implementation of [tldr](https://github.com/tldr-pages/tldr) in +Rust: Simplified, example based and community-driven man pages. ![screenshot](screenshot.png) @@ -21,6 +21,35 @@ High level project goals: - [x] Command line interface similar or equivalent to the [NodeJS client][tldr-node-client] - [x] Be fast +A tool like `tldr` should be as frictionless as possible to use. It should be +easy to invoke (just `tldr tar`, not using another subcommand like `tldr find +tar`) and it should show the output as fast as possible. + +Tealdeer reaches these goals. During a (highly non-scientific) test (see +[#38](https://github.com/dbrgn/tealdeer/issues/38) for details), I tested the +invocation speed of `tldr ` for a few of the existing clients: + +| Client | Times (ms) | Avg of 5 (ms) | +| --- | --- | --- | +| [Tealdeer](https://github.com/dbrgn/tealdeer/) | `15/11/5/5/11` | `9.4` | +| [C client](https://github.com/tldr-pages/tldr-cpp-client) | `11/5/12/11/15` | `10.8` | +| [Bash client](https://github.com/pepa65/tldr-bash-client) | `15/19/22/25/24` | `21.0` | +| [Go client by k3mist](https://github.com/k3mist/tldr/) | `98/96/100/95/101` | `98.8` | +| [Python client](https://github.com/lord63/tldr.py) | `152/148/151/158/140` | `149.8` | +| [NodeJS client](https://github.com/tldr-pages/tldr) | `169/171/170/170/170` | `170.0` | + +Tealdeer is the fastest of all tested clients, although the C client and the +Bash client are in the same speed class. Interpreted languages are clearly much +slower to invoke, a delay of 170ms is definitely noticeable and increases +friction for the user. + +These are the clients I tried but failed to compile or run: +[Haskell client](https://github.com/psibi/tldr-hs), +[Ruby client](https://github.com/YellowApple/tldrb), +[Perl client](https://github.com/skaji/perl-tldr), +[Go client by anoopengineer](https://github.com/anoopengineer/tldr/), +[PHP client](https://github.com/BrainMaestro/tldr-php) + ## Usage tldr [options]