On Tue, 25 May 2004, Marti Maria wrote:

I guess the best move would be to optimize the algorithm whatever possible, which is proven to be the best optimization at all, and then make things easy for the compiler, but without going too deep. Just an example, 8-bit transforms are using lookup tables, which should speed up a lot... guess what? In some machines is faster to do the whole interpolation than a redirection across lookup table! At that point I decided to get rid of assembly whatever possible.

For targets which run the Autoconf script, the configure script can be used to make some optimization decisions. For example, since the configure script is able to compile and execute test programs, small test programs may be executed by the configure script in order to choose the best algorithm for the target.


This approach should only be used if multiple algorithms can be provided in the code (direct interpolation vs lookup table) and only for very key parts which dominate performance.

Yet another approach is to include both implementations in the compiled result, but evaluate the best algorithm to use by running some simple test programs after the software is compiled, and selecting the algorithm to use via an installation configuration option so that it becomes the default.

Bob
======================================
Bob Friesenhahn
[EMAIL PROTECTED]
http://www.simplesystems.org/users/bfriesen


-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
Lcms-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/lcms-user

Reply via email to