[Top][All Lists]

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

[Help-gsl] Re: Use of assembler code in matrix get element functions. Co

From: Rodney Sparapani
Subject: [Help-gsl] Re: Use of assembler code in matrix get element functions. Could be useful?
Date: Mon, 25 Oct 2010 09:46:38 -0500
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv: Gecko/20100720 Thunderbird/3.0.6

On 10/23/10 03:36 AM, José Luis García Pallero wrote:
First of all I should say that I don't know nothing about assembler
programming, so this is only a question.
In gsl_matrix_get functions the code that calculates the position of
an element in the storing vector is 'i * m->tda + j', that is a
product plus an addition. Could be a speed improving the
implementation of these operations in assembler via the asm() gcc
facilities? It could be programmed in assembler for x86 machines (so
these are the most common) and in standard C for the others.

Hi Jose:

I don't think it's that simple. I don't think you can do this arbitrarily for all compilers. You would need to detect GCC, or
not, and act accordingly.  I'd also suggest profiling the current
code to make sure that GCC has not already made this optimization.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]