diff --git a/EffectLab/Makefile b/EffectLab/Makefile index 918c997..5344f2f 100644 --- a/EffectLab/Makefile +++ b/EffectLab/Makefile @@ -1,5 +1,5 @@ EffectLabCore.so: core.c - gcc -I/usr/include/python2.7 -fPIC -shared core.c -o EffectLabCore.so + gcc -O2 -I/usr/include/python2.7 -fPIC -shared core.c -o EffectLabCore.so clean: - rm *.so \ No newline at end of file + rm *.so diff --git a/TestEffectLab.py b/TestEffectLab.py index fd090cd..9126d0b 100755 --- a/TestEffectLab.py +++ b/TestEffectLab.py @@ -89,4 +89,15 @@ def main(): if __name__ == '__main__': os.system('rm tmp/*') # autoreload.main(main) - main() + # main() + from timeit import Timer + from functools import partial + + img = Image.new("RGB", (100, 100)) + wave = GlobalWaveEffect(1, 0.5) + test = partial(wave, img) + + t = Timer('test()', 'from __main__ import test') + + print avg(t.repeat(3, 100)) +