[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: What to do with optimization flags ?



On Tue, Nov 28, 2000 at 05:21:14AM +0100, Samuel Hocevar wrote:
>    In the case of CPU-hungry applications such as a movie player,
> MMX and PentiumPro optimizations can sometimes double the app's
> performances. The drawback is that a ppro+mmx binary will only work on a
> ppro+mmx CPU.
[snip]
>    I thought of doing a package with several versions of the binary,
> with a shell wrapper testing /proc/cpuinfo or whatever, and launching
> the right binary. But this probably means twice to four times the build
> time. Is this acceptable ?
[snip]

Hmm. I propose we consider adding to dpkg the ability to selectively
install some files from a package, perhaps based on analysis by a
postinst/preinst-like script. So for a package where CPU-specific
optimizations make a big difference*, we can have several binaries in the
package and have dpkg or a preinst script decide which one to install.

(*Note: I would strongly discourage using this in cases where the gain is
only marginal -- don't bloat packages unnecessarily.)

I seem to remember somebody else suggesting this for another problem some
time ago, but I can't recall exactly what it was.


T

-- 
Caffeine underflow. Brain dumped.

Attachment: pgpJ0VL7FwRGW.pgp
Description: PGP signature


Reply to: