Re: render.c:GetPixelOpacity() optimization ideas?
Bob Friesenhahn <[email protected]>
| Newsgroups | gmane.comp.video.graphicsmagick.core |
|---|---|
| Message-ID | <Pine.GSO.4.44.0401151908550.29988-100000@scooby.simplesystems.org> |
On Fri, 16 Jan 2004, Wolfgang Spraul wrote: > > Have there been more optimized GPO versions in the past (let's say 5 years > ago)? (I'm asking because I doubt many machines would have been able to > handle the enormous amount of double calculations for relatively simple > drawing primitives back then) This code dates from three or more years ago. It is much faster (4X?) than the the previous implementation. > Would it be possible to identify some of the variables in GPO as constants > when rendering certain primitives (let's say solid color, no aliasing, etc)? > And then implement several GPO versions and choose the one that is just > flexible enough but lets the compiler make use of the constants. Certainly. Anything is possible given sufficient understanding and time. > Would it be possible to modify the next higher function, > DrawPolygonPrimitive() to call GPO less/much less in certain cases? Maybe. Perhaps antialiasing operation can be thresholded more quickly for a performance/quality tradeoff. Do you have access to a high quality profiler? I occasionally use gcov (--enable-gcov) to do source line-level profiling. Rather than actually measuring time spent in functions (which is often wrong due to the profiler overhead), it produces annotated source files indicating how many times a given line of code was executed. This is a great way to find hot-spots. It can help to determine how many times conditional code is executed in order to decide which conditions should be moved ahead of others in order to produce the best short-circuit effect. GCC supports options to use profiler output (-fprofile-arcs) to change how it optimizes the code. I have no experience with that. If you have a hardware emulator/analyzer for the ARM, it may offer a high quality hardware-based profiler which allows you to profile the application with a high degree of accuracy so you can identify the operations which are doing the most damage. Bob ====================================== Bob Friesenhahn [email protected] http://www.simplesystems.org/users/bfriesen ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn