On 01/01/2010 01:27 PM, Per Jessen wrote:
Ah, yes, I agree (of course) - I thought you meant just wrapping the assembler code in C-functions, which didn't seem to give me much.
A complete rewrite in C is not an option - the vast majority of this code does math and such, and is highly optimized/specialized/tweaked (no pipeline stalls etc). On 01/02/2010 04:11 AM, Per Jessen wrote: Petr Baudis wrote:
On Fri, Jan 01, 2010 at 07:27:49PM +0100, Per Jessen wrote:
A complete rewrite in C is not an option - the vast majority of this code does math and such, and is highly optimized/specialized/tweaked (no pipeline stalls etc).
Are you _sure_ that what was highly optimized in pentium times will
It has been kept up-to-date with modern architectures - we've stuck to tasm for as long as possible, and also 'enhanced' it with a few macros for support of newer instructions.
For the x86 series that strategy is ok, but you are running into dead
ends. Hopefully, yasm will fill your needs.
I would actually consider using FORTRAN. FORTRAN compilers today provide
very good optimizations where C is more difficult to optimize.
One possible test is to take a reletively small module, recode it in
FORTRAN and C, aggressively optimize it and run some benchmark tests.
While GCC is a good compiler, other commercial compilers, like Intel,
take the same factors into account, such as latency and pipeline stalls.
--
Jerry Feldman