Musepack Forums  

Go Back   Musepack Forums > Main > Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 21 August 2005, 03:12 pm   #1
stan_wkc
Member
 
Join Date: Aug 2005
Posts: 2
Default Is it possible to switch to YASM?

AFAIK, NASM does not generate 64-bit code on Linux x86-64 target.
This makes some nasm-compiled object files could not link with
the encoder. mppenc's speed falls from ~20x to ~16x
on my Athlon 64 3000+(S939) with profile "standard".

From what I have heard, YASM, a replacement of NASM, could generate 64-bit code.
Currently it uses an extension of NASM syntax to support x86-64 assembly.
IMO those SSE registers do not change much. With a little modification,
is it possible to go with YASM?
stan_wkc is offline   Reply With Quote
Old 21 August 2005, 09:10 pm   #2
Shy
Admin
 
Shy's Avatar
 
Join Date: Jul 2004
Posts: 365
Default

The old NASM code in mppenc is related to 3dnow! and is disabled since it doesn't affect speed. You need to manually change the source code to enable it. Have you done that? If not, your speed decrease may be due to compiling as 64-bit with "optimizations" which actually slow things down a lot.
Shy is offline   Reply With Quote
Old 22 August 2005, 02:19 pm   #3
stan_wkc
Member
 
Join Date: Aug 2005
Posts: 2
Default

No. It's only "-O2 -pipe -march=k8 -ffast-math -funroll-loops".
Adding -fweb and disabling SSE & SSE2 instructions improves a lot.
Speed boosts from ~16x to ~18x.

But it is a bit off-topic.
The situation was I could see about 3 warnings about incompatible code mixing during compile. Are they harmless?
stan_wkc is offline   Reply With Quote
Old 22 August 2005, 04:47 pm   #4
DEATH
foobar2000 developer
 
Join Date: Jul 2004
Posts: 4
Default

Let me re-phrase what Shy said.
Mppenc's assembly code (fft4gasm.nas) contains 3DNow-optimized versions of some of functions, it's deprecated and does not appear to give significant improvement on current CPUs, at least with Microsoft compilers. Fft4gasm.nas will be most likely dropped from sourcecode package in next release.
Additionally, source code needs to be modified for functions from assembly module to be actually called. If you compile current source even with assembly module included, assembly functions are never called, unless you alter relevant line of fft4g.c.
DEATH is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Replaygain's "smart" switch drmrbrewer General 0 03 March 2005 09:43 am


All times are GMT. The time now is 07:23 am.


Powered by vBulletin® Version 3.8.11 Beta 2
Copyright ©2000 - 2017, vBulletin Solutions Inc.