[Vorbis-dev] Low level optimization
Tuomo Latto
djv at mbnet.fi
Thu Feb 10 09:40:40 PST 2005
Aleksey wrote:
> Yann Guidon wrote:
>>Aleksey wrote:
>>>I think it is time to do core optimizations to vorbis-coder/decoder
>>>in asm. I`d like to help. What you think about that?
>>
>>higher level optimisations + good compiler switches is safer and far
>>less painful IMHO.
>>
>>unless you are already a P3 or P4 programming guru
>>but then, others having non-x86 computers will be disapointed.
>
> I mean rewrite critical core functions using x86 *simd* instructions. It
> significaly increase speed on x86(and new x86-64) machines IMHO, and
Only on machines that support them.
I, for one, don't have a single x86 computer that would support them
- provided, of course, that you mean SSE/SSE2 and not MMX.
(Athlon Thunderbird, Intel PII and Via C3 in case you're interested.)
> precision will not change significaly. I just want to do vorbis faster
> for most users, who have x86. They paid for simd instructions and
> probably will be disappointed too, if vorbis will be slower than could
> be on their machines. And why others who have non-x86 computers will by
> disappointed? They simply couldn't use these optimizations and will use
> pure vorbis C code, as it is at this time. Why do not to use it if it
> exists ;)
Maybe they should complain to Microsoft (or Borland or ...) for not making
compilers that would optimize this. And to Intel too, for adding instructions
that can't be used more easily (and for asking more money for it).
They might as well complain to their retailer while they're at it, for
advertising the benefits of said instructions, yet not telling people that
getting the performance benefits requires extra effort from developers
(=coding stuff in asm)...
Seriously though, using asm would probably reduce portability.
GCC (=cygwin, mingw, ..?) uses AT&T syntax.
What about the asm-block itself?
Is the syntax compatible between compilers?
...which reminds me, vorbis-tools 1.0.1 won't compile out of the box
on MinGW (MSYS) unless the MSVC dependence on line 26 of platform.c is removed.
Not surprisingly MinGW does not define _MSC_VER so setbinmode() ends
up missing.
Quick fix:
--- clip -->
26c26
< #if defined(_WIN32) && defined(_MSC_VER)
---
> #if defined(_WIN32) //&& defined(_MSC_VER)
<-- pilc ---
--
Tuomo
... Don't hit a man when he's down ...kick him, it's easier
More information about the Vorbis-dev
mailing list