Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • P pypocketfft
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 4
    • Issues 4
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Martin Reinecke
  • pypocketfft
  • Merge requests
  • !17

Improve good_size and export to python

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Peter Bell requested to merge good_size into master Jul 30, 2019
  • Overview 3
  • Commits 1
  • Pipelines 0
  • Changes 2

This improves the algorithm for good_size. The main observation is that division by 2 is cheap, so we can alternate between multiplying by 3 and dividing by 2 to reduce the search space to only numbers near n. This also adds an early return when n matches a composite number. You can play around with the micro-benchmarks here (this is good_size2).

This also adds a variant for real transforms with 5-smooth numbers and exports both of them to python as a single function.

Edited Jul 30, 2019 by Peter Bell
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: good_size