bug-gsl
[Top][All Lists]
Advanced

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

Re: [Bug-gsl] gsl_vector_get / set


From: Matthieu Geist
Subject: Re: [Bug-gsl] gsl_vector_get / set
Date: Mon, 1 Dec 2008 09:44:23 +0100

Hello,

You're right, the inline function was not imported correctly.

Thank you,

Matthieu
  ----- Original Message ----- 
  From: Brian Gough 
  To: geist_mat 
  Cc: address@hidden 
  Sent: Saturday, November 29, 2008 3:39 PM
  Subject: Re: [Bug-gsl] gsl_vector_get / set


  At Fri, 28 Nov 2008 11:26:49 +0100,
  geist_mat wrote:
  > 
  > Hi,
  > 
  > Trying to optimize some code, i remarked that calling the gsl_vector_get
  > function was much more slower than just accessing the structure with
  > something like v->data[i*v->stride], and the same seems to hold for
  > gsl_vector_set. On my program, it is about 15 time faster, however here
  > is a simpler example.

  Hello,

  Have you checked the preprocessor output 'g++ -E ...' to make sure the
  inline version of the function is being imported correctly?  I tried
  the program and get the same speed in each case as would be expected.

  -- 
  Brian Gough

  Support freedom by joining the FSF
  http://www.fsf.org/news/fall-2008-fundraiser

  $ g++ -Wall -O3 -DMANUAL -I ~/gsl -g inline.c  ~/gsl/.libs/libgsl.a  
  (14:36)$ time ./a.out
  0

  real 0m2.795s
  user 0m2.771s
  sys 0m0.005s
  (14:36)$ 

  (14:36)$ g++ -Wall -O3 -DHAVE_INLINE -I ~/gsl -g inline.c  
~/gsl/.libs/libgsl.a  
  (14:36)$ time ./a.out
  0

  real 0m2.797s
  user 0m2.771s
  sys 0m0.003s


reply via email to

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