Skip to content

Instantly share code, notes, and snippets.

@kbknapp
Last active October 7, 2015 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kbknapp/fb28a49d7a0fe8b8e400 to your computer and use it in GitHub Desktop.
Save kbknapp/fb28a49d7a0fe8b8e400 to your computer and use it in GitHub Desktop.
compares vanilla racer to forks using docopt and clap

About

Some very naive tests comparing forks and vanilla phildawes/racer

  • Uses current stable Rust (rustc 1.3.0 (9a92aaf19 2015-09-15))
    • All version compiled with --release
  • Uses valgrind
    • valgrind racer complete std::io::B
  • Uses Python 3.4.3
    • python -m timeit -n 1 -r 100 -s 'import os' 'os.system("racer complete std::io::B")'
  • Uses time
    • for i in {0..10}; do time racer complete std::io::B; done | grep -v MATCH
    • Manual averaging
  • All tests performed on Intel(R) Core(TM) i7-4710HQ CPU @ 2.50GHz
  • OS: Arch Linux x64 (Kernel 4.2.2-1)

Vanilla

Uses branch phildawes/master#b9750c373a

  • Number of Allocs: 12
  • Bytes Allocated: 66,753
  • Python: best of 100: 5.62 msec per loop
  • Average time: r 0.00, u 0.00, s 0.004

Uses branch phildawes/master#1e04569993

  • Number of Allocs: 1,198
  • Bytes Allocated: 406,289
  • Python: best of 100: 5.48 msec per loop
  • Average time: r 0.00, u 0.00, s 0.007

Uses branch phildawes/master#22b452de

  • Number of Allocs: 11,793
  • Bytes Allocated: 2,582,216
  • Python: best of 100: 9.75 msec per loop
  • Average time: r 0.01, u 0.00, s 0.008

Docopt v0.6.70

Uses branch kbknapp/docopt#7bcb2ae2

  • Number of Allocs: 32,186
  • Bytes Allocated: 7,093,768
  • Python: best of 100: 14 msec per loop
  • Average time: r 0.01, u 0.00, s 0.013

clap

v1.4.5 Uses branch kbknapp/clap-update#6bd1bd8ca8

  • Number of Allocs: 13
  • Bytes Allocated: 67,185
  • Python: best of 100: 4.71 msec per loop
  • Average time: r 0.01, u 0.00, s 0.04

v1.3.1 Uses branch kbknapp/clap-update#68f5409b5d

  • Number of Allocs: 1,358
  • Bytes Allocated: 588,697
  • Python: best of 100: 5.64 msec per loop
  • Average time: r 0.01, u 0.00, s 0.07

v1.2.0 Uses branch kbknapp/clap#0450278b

  • Number of Allocs: 11,969
  • Bytes Allocated: 3,161,312
  • Python: best of 100: 9.54 msec per loop
  • Average time: r 0.01, u 0.00, s 0.08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment