GSL Error Handling

Brian Gough bjg@network-theory.co.uk
Mon Jul 17 14:51:00 GMT 2000


E. Robert Tisdale writes:
 > The cost of checking for programming errors at run time
 > is not negligible.

The cost of error checking for most functions in GSL is negligible,
i.e. it is a small fraction of the total cost of the function, since
it is the body of the function which does most of the work.  Of
course, for small functions like gsl_vector_get the checking is a
larger percentage of the function, but there we do provide macros to
turn off the checking (GSL_RANGE_CHECK_OFF).

To return to the original questions, maximising performance is not a
priority for this project. The goal is to provide a range of simple,
everyday functions for developing free (GPL'ed) scientific software in
C.  Unfortunately existing libraries cannot be used in free
sofware. If, for example, Numerical Recipes had originally been GPL'ed
then there would have been no reason to write GSL, as any technical
problems with NR could have been fixed and the patches shared.

best regards,

Brian Gough


More information about the Gsl-discuss mailing list