Skip to content

Instantly share code, notes, and snippets.

@homm
Last active June 18, 2016 10:47
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 homm/83fea815536a5390a9525bf32b499f4a to your computer and use it in GitHub Desktop.
Save homm/83fea815536a5390a9525bf32b499f4a to your computer and use it in GitHub Desktop.
#!/bin/bash -e
BRANCHES=( 3.2.0 new-filters resample-adaptve
v3.2.0.post1 v3.2.0.post3 resample-sse-next simd/resample-adaptive )
echo ">>> CPU INFO"
cat /proc/cpuinfo
virtualenv env
source ./env/bin/activate
pip install nose
if [ ! -d pillow ]; then
git clone https://github.com/uploadcare/pillow-simd.git pillow
fi
if [ ! -d pillow-perf ]; then
git clone https://github.com/homm/pillow-perf.git pillow-perf
fi
cd pillow
for (( i=0; i<${#BRANCHES[@]}; i++ ));
do
BRANCH=${BRANCHES[$i]}
echo "=========================================="
echo ">>>>>>>>>>>>>>>> $BRANCH <<<<<<<<<<<<<<<<<"
echo "=========================================="
git checkout $BRANCH
RUNS=10
if [ "$i" -gt 2 ]; then
RUNS=20
fi
touch ./libImaging/Resample.c
CC="gcc -msse4" python ./setup.py develop
nosetests -v -s ./Tests/test_image_resample.py || echo ":(((("
../pillow-perf/test.py ../pillow-perf/3k.jpg -n $RUNS
if [ "$i" -gt 2 ]; then
touch ./libImaging/Resample.c
CC="gcc -mavx2" python ./setup.py develop
nosetests -v -s ./Tests/test_image_resample.py || echo ":(((("
../pillow-perf/test.py ../pillow-perf/3k.jpg -n $RUNS
fi
done
deactivate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment