Re: GStreamer 0.01



On Fri, May 27, 2005 at 07:48:31 +0200, A. Pagaltzis wrote:
* Torsten Schoenfeld <kaffeetisch gmx de> [2005-05-26 19:10]:
The perl-xs guys suggested converting numbers to/from PVs (Perl
strings) and tell users to use Math::BigInt for calculations.
I'll see if this works out.

Math::BigInt::FastCalc can help avoid the glacial speed of
vanilla Math::BigInt::Calc. Recent versions of Math::BigInt will
automatically use ::FastCalc in place of ::Calc when available.
Other options include ::GMP or ::Pari, which however have much
larger dependencies.

Then there???s Math::BigInt::Lite, which uses native Perl integer
operations as long as Perl integers have sufficient range, and
upgrades itself to Math::BigInt when Perl integers would
overflow. This must be used in place of Math::BigInt.

Finally, there???s the bigint/bignum/bigfloat pragmata, which
automatically load the corresponding Math:: modules and which
will autobox constants. bignum/bigint will automatically use
::Lite if it???s available.

So yeah, anyway. The point is, vanilla ::BigInt is cosmologically
slow, but with just a moment taken to install another module or
two you can get much better speed for zero programming effort.

This should go somewhere into the GStreamer POD (not necessarily
in as much detail as I went into), because not everyone???s going
to know about it.

Shouldn't it really be done in Glib? Glib provides the gint64 and
guint64 types and I assume GStreamer just uses them. So it should be the
Glib typemap that maps them to appropriate Math::BigInt types.

Ok, the warning should still exist in GStreamer documentation, since the
type is not used much by other Glib users.

-------------------------------------------------------------------------------
                                                 Jan 'Bulb' Hudec <bulb ucw cz>

Attachment: signature.asc
Description: Digital signature



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