Skip to content

factor-integer is particularly slow for specific numbers #2

Description

@hungrydonkey

It is interesting that factor-integer takes a long time to be factorized (715046126845429 * 23285202571949989190999811046775309). In contrast, Sagemath only takes 2 seconds on the same machine. For most cases, their speeds are similar.

raku -e 'use Math::NumberTheory; my $s = now; factor-integer(23285202571949989190999811046775309*715046126845429); say now - $s'
321.373416452
time sage -c "factor(715046126845429 * 23285202571949989190999811046775309)"

________________________________________________________
Executed in    2.35 secs    fish           external
   usr time    2.11 secs  694.00 micros    2.11 secs
   sys time    0.24 secs  379.00 micros    0.24 secs

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions