This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
Re: ANN: PyrexGsl 0.01
- From: Mario Pernici <Mario dot Pernici at mi dot infn dot it>
- To: gsl-discuss at sources dot redhat dot com
- Cc: pygsl-discuss at lists dot sourceforge dot net
- Date: Wed, 28 Apr 2004 01:08:45 +0200 (CEST)
- Subject: Re: ANN: PyrexGsl 0.01
>> PyrexGsl is a Pyrex interface to GSL.
> How does this compare to pygsl?
pygsl is Python library, which means that its functions
depend on Python objects, which are transformed
back and forth in the C-types used by GSL.
PyrexGsl is a Pyrex library, with C-type functions,
depending only on the C-types used by GSL.
A piece of Pyrex code with only C-type functions
is transformed by the Pyrex compiler in the
corresponding C code, which is essentially the same.
To export the result to Python, one uses
a Python-type function, which returns a Python object.
The Pyrex compiler creates the appropriate
C-Python interface for the Python-type function.
Each approach has advantages and disadvantages.
Advantaged of pygsl:
-no compilation phase
-automatic memory management
-exceptions
-interface with Numeric provided
Disadvantages of pygsl:
-It is significantly slower than GSL.
Advantage of PyrexGsl:
-It is almost as fast as GSL in long computations
(lot of GSL function calls, Monte Carlo)
Disadvantages of PyrexGsl:
- it is necessary to compile
- memory management necessary (as in GSL)
- no exceptions.
- no interface with Numeric provided.
Greetings
Mario