Speed comparison
dbrgn opened this issue · comments
A command line tool for quickly looking up a command should be fast.
Is this client faster than others? If yes, add it to the README.
Test case: Measuring real time for tldr tar
using the time
command.
I measured the command 5 times and calculated the average.
cd tealdeer
cargo build --release
time target/release/tldr tar
Times: 15ms / 11ms / 5ms / 5ms / 11ms
-> 9.4ms
cd tldr-cpp-client
make
./tldr -u
time ./tldr tar
Times: 11ms / 5ms / 12ms / 11ms / 15ms
-> 10.8ms
npm install tldr
node_modules/.bin/tldr --update
time node_modules/.bin/tldr tar
Times: 169ms / 171ms / 170ms / 170ms / 170ms
-> 170.0ms
cd tldr.py
python3 -m venv venv
venv/bin/pip install .
git clone https://github.com/tldr-pages/tldr source
venv/bin/tldr init
venv/bin/tldr reindex
time venv/bin/tldr find tar
Times: 152ms / 148ms / 151ms / 158ms / 140ms
-> 149.8ms
cd tldr-bash-client
./tldr -u
time ./tldr tar
Times: 15ms / 19ms / 22ms / 25ms / 24ms
-> 21.0ms
cd dist/build/linux
./tldr tar
time ./tldr tar
Times: 98ms / 96ms / 100ms / 95ms / 101ms
-> 98.8ms
I didn't manage to compile this:
stack setup
Downloaded lts-10.0 build plan.
AesonException "Error in $.packages.cassava.constraints.flags['bytestring--lt-0_10_4']: Invalid flag name: \"bytestring--lt-0_10_4\""
Not sure whether I'm doing this right :)
I didn't manage to compile this:
Downloading ruby-2.2.2.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.2.tar.bz2
Installing ruby-2.2.2...
WARNING: ruby-2.2.2 is nearing its end of life.
It only receives critical security updates, no bug fixes.
BUILD FAILED (Arch rolling using ruby-build 20171226)
Inspect or clean up the working tree at /tmp/ruby-build.20180211132117.14606
Results logged to /tmp/ruby-build.20180211132117.14606.log
Last 10 log lines:
linking shared-object pathname.so
make[2]: Leaving directory '/tmp/ruby-build.20180211132117.14606/ruby-2.2.2/ext/pathname'
linking shared-object bigdecimal.so
make[2]: Leaving directory '/tmp/ruby-build.20180211132117.14606/ruby-2.2.2/ext/bigdecimal'
linking shared-object date_core.so
make[2]: Leaving directory '/tmp/ruby-build.20180211132117.14606/ruby-2.2.2/ext/date'
linking shared-object nkf.so
make[2]: Leaving directory '/tmp/ruby-build.20180211132117.14606/ruby-2.2.2/ext/nkf'
make[1]: Leaving directory '/tmp/ruby-build.20180211132117
Not sure whether I'm doing this right :)
Not sure how to run this without installing it systemwide.
Can't locate App/tldr.pm in @INC (you may need to install the App::tldr module) (@INC contains: /home/danilo/.opam/tezos/lib/perl5 /usr/lib/perl5/5.26/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/5.26/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/5.26/core_perl /usr/share/perl5/core_perl) at script/tldr line 5.
BEGIN failed--compilation aborted at script/tldr line 5.
Didn't work for me:
cd tldr_0.1.4_linux_amd64
./tldr --update-cache tar
INFO[0000] Downloading fresh tldr's from https://github.com/tldr-pages/tldr/archive/master.zip
FATA[0000] user: Current not implemented on linux/amd64
Didn't work for me:
cd tldr-php
composer install
./tldr -u
...this blocks forever (>3min).
@dbrgn Do you think you can revisit this issue using https://github.com/sharkdp/hyperfine to test the startup time of all the executables? (and also list your hardware, even though it shouldn't matter that much in this use case, it would provide more authenticity to the tests)