[Top][All Lists]

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

Re: [Help-gsl] Nature of gsl_vector_view [was "Re: Contents Help-gsl Dig

From: Rhys Ulerich
Subject: Re: [Help-gsl] Nature of gsl_vector_view [was "Re: Contents Help-gsl Digest, Vol 103, Issue 4 (Vector Views)"]
Date: Mon, 7 May 2012 12:51:17 -0500

Hi Gideon,

> I guess the question I'm really asking is, from a performance standpoint,
> is it bad to be using a lot of vector views to mask the data?  It enhances
> the clarity of the code, but is having many instances of the vector views
> problematic, from a memory usage point of view?

Re: memory overhead. Most likely it doesn't matter if you have O(1)
active vector views at any time.  By this I mean, you may have O(N)
vectors of data but within any particular loop you're creating a small
number of views before calling into the GSL.

It would be more problematic from a memory overhead perspective if you
have O(N) views and O(N) vectors of data (but depending on the amount
of data in any particular vector, this too may be moot).

Re: runtime performance.  At -O2 I would expect the compiler to whisk
much of the overhead under the rug.

- Rhys

reply via email to

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