Re: [Help-gsl] gsl performance

2013-10-06 Thread Simon Zehnder
Hi Gilbaerto,

congrats on your performance results! 

A first guess of the worse performance of the gsl library would be exception 
throwing. The GSL is made for 'users' and this means, that a user has to be 
informed about the kind of exception he encounters. This can be left out if you 
have your own code and you know your own code. If something goes wrong, you 
know where to look in your code where the error occurred and what could be the 
reasons. A 'user' just using a library could be helpless when he encounters and 
error and does not know where it occurred. So checking and error catching could 
be a reason, that makes the gsl less performant but more appropriate for 'easy' 
usage. 

I use a lot the C++ linear algebra library Armadillo. This library has for 
example two different element accessors: One, '()' which makes checkings and 
the second 'at()' with no checkings. Performance increases sometimes 
tremendously when using the 'at()' method. 

Best

Simon


On Oct 6, 2013, at 12:44 AM, onefire onefire.mys...@gmail.com wrote:

 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.




[Help-gsl] Where is the path for cblas folder?

2012-01-26 Thread Simon Zehnder
Dear gsl Users,

I face a probably very unusual error: 

I installed gsl-1.15 and tried to use it with Xcode 4.1 on my Mac (Lion 
10.7.2). Then I got the following compiler warnings:

warning: Could not find object file /Users/simon/Documents/C++ 
Classes/gsl-1.15/cblas/.libs/sasum.o - no debug information available for 
sasum.c.

warning: Could not find object file /Users/simon/Documents/C++ 
Classes/gsl-1.15/cblas/.libs/saxpy.o - no debug information available for 
saxpy.c.

warning: Could not find object file /Users/simon/Documents/C++ 
Classes/gsl-1.15/cblas/.libs/scasum.o - no debug information available for 
scasum.c.

warning: Could not find object file /Users/simon/Documents/C++ 
Classes/gsl-1.15/cblas/.libs/scnrm2.o - no debug information available for 
scnrm2.c.

warning: Could not find object file /Users/simon/Documents/C++ 
Classes/gsl-1.15/cblas/.libs/scopy.o - no debug information available for 
scopy.c.

warning: Could not find object file /Users/simon/Documents/C++ 
Classes/gsl-1.15/cblas/.libs/sdot.o - no debug information available for 
sdot.c.

warning: Could not find object file /Users/simon/Documents/C++ 
Classes/gsl-1.15/cblas/.libs/sdsdot.o - no debug information available for 
sdsdot.c.

warning: Could not find object file /Users/simon/Documents/C++ 
Classes/gsl-1.15/cblas/.libs/sgbmv.o - no debug information available for 
sgbmv.c.

there were much more of this kind, but it makes hear no sense to list them all. 
However, the weird thing is, that I renamed the folder C++ to CPlusPlus 
long before I compiled this file. As I was unable to find the error, I 
uninstalled Xcode and cleaned the gsl distribution from my hard drive. 

I really hoped after reinstalling gsl-1.15 and Xcode 4.2.1 I could get rid of 
this irregularity, but when I compiled first time after reinstalling I got the 
same messages again. 

So my question: There must be somewhere a file or environment variable, where 
this path for cblas seems to be stored. Does anyone know where it is? And no, 
it is not in my $PATH variable. I checked that already and in the Makefile of 
the cblas folder I can see a correct name CPlusPlus for the folder where to 
find the cblas. 

Thanks in advance!

Simon 


___
Help-gsl mailing list
Help-gsl@gnu.org
https://lists.gnu.org/mailman/listinfo/help-gsl