How to get known which optimisations are used ?
Opened this issue ยท 4 comments
I just executed command pip3 install Pillow-SIMD
.
Now, my thumbnailer works right.
Question: How I can know which SIMD operations sets are really used ?
I did not notice speedup...
See installation section. By default SSE4 is used.
I did not notice speedup...
Could you show the code?
You can ensure that SIMD version is installed:
$ python -c "from PIL import Image; print(Image.PILLOW_VERSION)"
3.2.0.post3
If PILLOW_VERSION
has postfix, it is SIMD.
- code just creates thumbnails and nothing more.
- Yes, I have installed SIMD version, I have checked.
- I will measure performance.
It will be nice if I have Python API to get actual optimisation level. i.e.
PIL.get_SIMD_level()
returning one of, 'Vanilla'
, 'SSE4'
, 'SSE4+AVX2'
. Or, in Python 3, Enum
instead of strings.
$ python -c "from PIL import Image; print(Image.PILLOW_VERSION)"
This does not work with 7.0.0.post3, but might work with some future versions, because of the constant depreciation iterations:
PILLOW_VERSION
has been deprecated and will be removed in a future release. Use__version__
instead.
It was initially removed in Pillow 7.0.0, but brought back in 7.1.0 to give projects more time to upgrade.
This should work:
$ python -c "from PIL import Image; print(Image.__version__)"