Skip to content

Possible improvement for method 'factors' #5

@OshinoMoumou

Description

@OshinoMoumou

Greetings!
I noticed that method factors referred a StackOverflow post, while a recent comment to it mentioned that using 'if not n % i' instead of 'if n % i == 0' can speed up for 20-30%.
I'm trying to learn the usefulness of such small updates on StackOverflow. Would this comment help improve your code? I understand that such speedup might not be that helpful in real life situation. In that case, do you think this comment can help promote future projects (for example, when the code were reused somewhere else)?
I'll really appreciate it if you could kindly give me some feedback or suggestions. Thank you very much for your time.
Have a nice day!

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