Changes for version 0.10 - 2012-05-24

  • Added an END{} block with code that will satisfy Inline so that no warnings are generated if M::P::FS is "require"d instead of "use"d. (Issue raised by Dana Jacobsen, patch by Sisyphus -- Thanks all!)
  • Patched both implementations of the Primes Sieve of Eratosthenes to increment inner loop j+=2 instead of ++j. This optimization yields a substantial performance increase (in the area of 20-30%) for the exported 'primes()' function, for example. ( Suggestion from Dana Jacobsen ).
  • Converted all subs to accept longs instead of ints as parameters, as well as to return longs. That means for Perls compiled with long support, the prime sieve can go past 2.7 billion. ( Again, thanks to Dana Jacobsen for the suggestion.
  • NOTE: If smoke testing determines that the 'long' support breaks compatibility with 32 bit Perls this particular patch may be rolled back, or may be implemented as a separate function that only compiles into 64 bit Perls. In this release, 'long' support is experimental.

Modules

Generate a list of all primes less than or equal to $n. Do it quickly.