help-gsl
[Top][All Lists]
Advanced

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

[Help-gsl] gsl performance


From: onefire
Subject: [Help-gsl] gsl performance
Date: Sat, 5 Oct 2013 18:44:01 -0400

Hi all,

I am creating a personal library for my C++ projects and to evaluate its
performance I decided to compare it to gsl and, to my surprise, my library
is much faster than gsl in many cases. For example, my Nelder-Mead
implementation can be 5 or 10 faster for some functions.

This has been bothering me a lot because:
1) My tests are correct, and I checked the results against output from
Scipy and Octave.
2) I am certainly not smarter than the many people who worked on gsl over
the years.
3) I think I know how to use gsl "properly".

Sorry I do not have an example, but my library is not polished enough for
me to publish it yet.

What I am really intrigued about  is that I googled around and it seems
that many people noticed (before me) that many gsl implementations are
inefficient. I also found some posts on the mailing lists with things like
"gsl is much slower than Matlab" and responses like "gsl is not meant to be
the fastest".

These things lead me to believe that gsl is "slow" by design, If this is
the case, can someone explain to me why this is so?

Gilberto

PS: Much of the gain with C++ comes from better inlining, which can be
specially important with things like function optimization (it is hard, if
not impossible, to inline when there is a funcyion pointer passed around).
This is why std::sort can be much faster than lqsort. However, I am
confident that it is possible to write faster implementations (in C) than
some of the ones in gsl.


reply via email to

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