are pure perl modules just masochism in disguise?
Set::Infinite is pure Perl and is reasonably fast. I can't say if it will serve your purposes, however. It does not rely in bit sets - it uses "spans" internally.
| [reply] |
thanks fglock. the use of bitsets is important because
theoretically i can unions, intersections etc a little faster, in a little less space - and the sets can be large,
and it needs to be *fast*, or i will spend all my time answering 'why did you do it this way when it is soooo slow'
type questions.
for 'sparse' sets, the approach your Set::Infinite takes is much more sensible, allowing it to
do clever things with more complicated set types. i particularly like it's connection with dates, which seems a good idea. Quantum::Superpositions is something i should check out too, I guess.
...wufnik
-- in the world of the mules there are no rules --
| [reply] |
Ok, I know it said "pure perl", but in case you are looking for a decent C implementation for Perl, look at Math::BigGMP. It's a drop in replacement for Math::BigInt.. Just throwing options for "related" questions..
| [reply] |
Pure-perl alternatives for XSish modules are always useful, for people stuck on Windows or Mac or similarly compiler-less systems. As for perl6 - it doesn't exist yet, and isn't expected any time soon. Don't wait to release stuff just because we'll get it in perl6.
However, check to see that Math::Bigint doesn't already do what you want. It's part of the core in 5.8, and possibly in earlier versions, I disremember. | [reply] |