On 14 May 2013 00:32, Robin Watts <robin.wa...@artifex.com> wrote: > Before you dive into the complexities of multithreading etc, it would > seem sensible to ensure you are getting the best possible performance > out of the transform routine in the first place.
Makes sense. > LCMS has various different transform routines built in; by using a > cunning scheme, it can pick the appropriate one at runtime. If there > happens to be one in its repertoire that exactly fits your needs, it can > run considerably faster than if it has to use a generic one. Other than profiling, how do we know if it's chosen a built-in version rather than the generic version? > To speed ghostscripts use of lcms2, I wanted to optimise the transforms > that we use as much as possible. But we use quite a lot of them, and I > didn't want to have to hand write optimised ones for all of the > different cases. So I implemented a system that uses a chameleonic > header; set a few options with #defines, and include the header, and it > makes the optimised transform function for you. I see, https://github.com/robinwatts/Little-CMS/blob/artifex/src/cmsxform.h -- that looks pretty magic, is there no way to do that without the #preprocessor trickery? > He did however point out that I could recast the code slightly as a > plugin for lcms 2. This gives the same benefits without polluting the > internals of the library itself. I plan to do this at some point, but I > have not got round to it yet. Yes, that would be awesome. Thanks, Richard. ------------------------------------------------------------------------------ AlienVault Unified Security Management (USM) platform delivers complete security visibility with the essential security capabilities. Easily and efficiently configure, manage, and operate all of your security controls from a single console and one unified framework. Download a free trial. http://p.sf.net/sfu/alienvault_d2d _______________________________________________ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user