public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Stroller <stroller@stellar.eclipse.co.uk>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] USE="mmx mmxext sse sse2 ssse3 3dnow 3dnowext"
Date: Thu, 28 May 2009 20:13:57 +0100	[thread overview]
Message-ID: <9837B633-4DCD-47E2-9A88-442A0FE750BC@stellar.eclipse.co.uk> (raw)
In-Reply-To: <20090528131735.10e3b3ce@ilievnet.com>


On 28 May 2009, at 11:17, Daniel Iliev wrote:
> ...
> Not the same thing. "-march=" instructs gcc to produce a binary
> designed to run only on the given CPU architecture, while
> USE flags instruct the build system to include or not support for a
> given feature ...

Actually, I _think_ in mplayer the difference is that the USE flags  
enable the use of hand-written assembler code which takes advantage of  
the MMX or whatever.

I'm not 100% sure about this at all, but what's the difference in the  
architectures of the Pentium 2 & the Pentium 3, if not for the support  
for SSE? (and / or whatever)

Sure they are designed differently, but surely the instruction sets of  
all 32-bit processors from the earliest Pentiums even to Core Duos  
(not Core2s) are all basically x86. Some have these extended  
instruction sets (EIS, I think you called them earlier in the thread)  
and those are the additions from one generation to the next. So if you  
choose -march=pentium3 it will not run on a Pentium 2 because Pentium  
2s do not have SSSE, and it's the *compiler* that added the code that  
utilises SSE.

I believe that mplayer is one of those exceptional packages which uses  
some assembler optimisations. These don't make any sense for most  
programs, because it takes too much time to write & much maintenance  
is loads of hassle, and assembler will make little difference. Most  
programs are one minute opening a new window, and the next minute are  
waiting for the mail server to reply and are doing lots of different  
tasks which are not worth hand optimising. But once mplayer has  
started decoding a video, then it's doing the same thing time & time  
again, decoding each frame of the picture - it does exactly the same  
thing 25 times per second for an hour or two at a time, so that may be  
worth optimising for if the compiler is found to be less clever than  
someone like John Carmack.

I'm not absolutely sure that the USE flags enable hand-written  
assembler code, but what I do know is that:
1) ASM stands for assembler. See http://en.wikipedia.org/wiki/Asm
2) Google "mplayer asm" returns a bunch of hits.
3) MMX was marketed as "MultiMedia eXtension"
4) mplayer is a multimedia player.
5) MMX doesn't have floating point support, but SSE adds that and has  
dedicated functions for multiplying floating point numbers [1], which  
is just the sort of thing that one are useful in decoding mpegs &  
playing back video.

Stroller.




[1] http://en.wikipedia.org/wiki/Streaming_SIMD_Extensions



  reply	other threads:[~2009-05-28 19:14 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-26  4:27 [gentoo-user] USE="mmx mmxext sse sse2 ssse3 3dnow 3dnowext" Stroller
2009-05-26  4:37 ` Adam Carter
2009-05-26  4:59   ` Volker Armin Hemmann
2009-05-26  4:37 ` Volker Armin Hemmann
2009-05-26  5:00   ` Stroller
2009-05-26  5:10     ` Volker Armin Hemmann
2009-05-26  6:15       ` Stroller
2009-05-26  6:27         ` Volker Armin Hemmann
2009-05-26  8:34           ` Stroller
2009-05-26 14:31     ` Daniel Iliev
2009-05-26 21:07       ` Stroller
2009-05-27  0:47         ` Daniel Iliev
2009-05-27  8:14           ` Stroller
2009-05-27 10:00             ` Daniel Iliev
2009-05-27 12:14               ` Stroller
2009-05-27 19:57                 ` Wyatt Epp
2009-05-27 20:04                   ` Volker Armin Hemmann
2009-05-27 20:09                     ` Alan McKinnon
2009-05-27 20:40                       ` Wyatt Epp
2009-05-27 20:47                         ` Volker Armin Hemmann
2009-05-27 21:04                         ` Mike Edenfield
2009-05-27 21:12                           ` Alan McKinnon
2009-05-27 23:00                       ` Adam Carter
2009-05-27 20:08                   ` Ward Poelmans
2009-05-27 21:04                     ` Mike Edenfield
2009-05-27 21:23                   ` Arttu V.
2009-05-28 10:17                     ` Daniel Iliev
2009-05-28 19:13                       ` Stroller [this message]
2009-05-28 20:08                         ` Ward Poelmans
2009-05-28 20:19                           ` Stroller
2009-05-28 20:27                             ` Ward Poelmans
2009-05-28 20:38                               ` Stroller
2009-05-29  5:30                             ` Graham Murray
2009-05-29  6:36                               ` Volker Armin Hemmann
2009-05-29  6:55                               ` Volker Armin Hemmann
2009-05-29 15:25                                 ` Mike Edenfield
2009-05-29  7:51                             ` Neil Bothwick
2009-05-26 22:20       ` KH
2009-05-26 22:26         ` KH
2009-05-26 22:32         ` Alan McKinnon
2009-05-26 13:26 ` [gentoo-user] " James

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9837B633-4DCD-47E2-9A88-442A0FE750BC@stellar.eclipse.co.uk \
    --to=stroller@stellar.eclipse.co.uk \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox