Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

Include both multibuild and libwebp default CFLAGS #125

Merged
merged 1 commit into from
Sep 2, 2019

Conversation

radarhere
Copy link
Member

Resolves python-pillow/Pillow#4040. libwebp equivalent of #117

Takes the new CFLAGs from https://github.com/webmproject/libwebp/blob/0e48d889eb90363c6ebf8ea276bae4d892f9d3c0/makefile.unix#L112

Testing with the following code -

from PIL import Image
import time
im = Image.open('hopper.jpg')
start = time.time()
for i in range(0, 1000):
    im.save('out.webp')
print(time.time() - start)
Speed macOS Linux
Timer script 19.58s 22.19s
Fix 5.34s 3.54s

@hugovk
Copy link
Member

hugovk commented Sep 2, 2019

Looks good!

What are -O3 -DNDEBUG? Do you have a link to some docs?

@hugovk
Copy link
Member

hugovk commented Sep 2, 2019

We could mention this in the release notes as well.

@nulano
Copy link
Contributor

nulano commented Sep 2, 2019

-O3 enables most GCC optimizations (docs).
-DNDEBUG defines NDEBUG symbol which is commonly used to mean Not Debug / Release build (e.g. in C++ assert funcion)

@hugovk hugovk merged commit 9d8a92c into python-pillow:master Sep 2, 2019
@radarhere radarhere deleted the webp branch September 2, 2019 20:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Performance issues on webp save for Pillow >= 5.2.0 from wheel
3 participants