Re: Optimizing libpng encode time
Adam Richter <[email protected]> Thu, 3 Sep 2020 08:45:53 -0700
| Newsgroups | gmane.comp.graphics.png.devel |
|---|---|
| Message-ID | <CAGn-TggaDsV6haazjPsWELvZfy+PSR7Q9ZafXmeYQj_2VnxCuQ@mail.gmail.com> |
Hi, everyone. I have pushed most of the changes I have discussed here to my "adam-tmp" branch at https://sourceforge.net/u/adamjrichter/libpng/ci/adam-tmp/tree/ , including both optimizations and other minor changes I have discussed. I am doing this in the hopes of reducing the chance of losing the changes and to make it easier for anyone to try them out and mention any problems or ideas for improvements, which I encourage anyone who is interested to do. For now, this branch changes the default optimization to "-O3". The principle of least change would be better served by my just enabling "-ftree-optimize" for a few functions in pngwutil.c, but I am concerned about putting a bunch of gcc-specific extension code in that file and also would like to see llvm and other compilers make similar optimizations. Alternatively, I thought about try to compile just that file with "-O3", but my initial web search suggests that Makefile.am does not have this capability, although I might be able to limit the "-O3" just to libpng and not the tests and utilities. Then again, I am not sure that building with "-O3' is a problem. As always, any feedback is welcome. Adam