Skip to content
This repository was archived by the owner on Jun 10, 2025. It is now read-only.

echavemann/learnsomething

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 

Repository files navigation

Part 4: Making things fasterer

Scenario

An intern has made a function to calculate all the unique prime factors for numbers in range of 2 through 1000 as part of their work. However, their code is extrememly slow and has been causing major slippage issues. You, after proving your knowledge through the previous steps are now tasked with optimizing their code.

Instructions

  • OPTIONAL: Run the initial code to see the time.
  • Optimize the given code to run below .07 seconds for calculating the prime factorization of all numbers from 2-2500, including 2, excluding 2500.
  • PR this change.
  • Write code that runs below .0001 seconds for calculating the prime factorization of all numbers from 2-2500, including 2, excluding 2500.
  • PR.

Questions

Please include the following when you are writing your PR:
General things:

  1. What is the purpose of this PR?
  2. What changes did you make? Why?
  3. What bugs did you find while testing?

This PR Specific:

  1. How does this make the code faster? How much headroom do you have?

About

Original NUFT Intern Project, Circa 2024

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors