Skip to content

Instantly share code, notes, and snippets.

@bmwiedemann
Created February 17, 2017 09:23
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 bmwiedemann/2db103cda98d9c750ff27e3f92f67e37 to your computer and use it in GitHub Desktop.
Save bmwiedemann/2db103cda98d9c750ff27e3f92f67e37 to your computer and use it in GitHub Desktop.
#!/bin/sh -x
# run as pycbench.sh 2>&1 | tee /tmp/pycbenchlog
t=/dev/shm/tmp
rm -rf $t ; mkdir $t ; cd $t
find /usr/lib*/python2.7/ -name \*.py -print0 | xargs -0 -iarg cp -a arg .
rm -f py3_test_grammar.py
du -s
find -name \*.py -print0 | xargs -0 cat | wc -
time find -name \*.py -print0 | xargs -0 python -m py_compile
find -name \*.py -print0 | xargs -0 rm
du -s
time tar cJf ../pyc.tar .
time tar xf ../pyc.tar
du ../pyc.tar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment