haas:spring2024:comporg:projects:pnc2
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
haas:spring2024:comporg:projects:pnc2 [2024/04/13 12:05] – wedge | haas:spring2024:comporg:projects:pnc2 [2024/04/18 10:46] (current) – [PNC2] wedge | ||
---|---|---|---|
Line 20: | Line 20: | ||
====PNC2==== | ====PNC2==== | ||
- | {{: | + | {{: |
Your next program, and first sieve, will be the Sieve of Eratosthenes. Perhaps among the best and likely longest-known sieves, its origins date from antiquity. | Your next program, and first sieve, will be the Sieve of Eratosthenes. Perhaps among the best and likely longest-known sieves, its origins date from antiquity. | ||
Line 27: | Line 27: | ||
In order for it to work, we must store all the values we're processing so we can obtain what is left when done– what remains are the prime values. | In order for it to work, we must store all the values we're processing so we can obtain what is left when done– what remains are the prime values. | ||
+ | |||
+ | Some refined considerations: | ||
+ | |||
+ | * include memory management related to the sieve in your timing | ||
+ | * for better visibility of performance, | ||
+ | * for graphing purposes, you may want to exclude the brute results, so your graphs do not suffer from needless compression (you want to see how soe performs against the better brute variants; at this point we already know it'll blow baseline brute out of the water) | ||
+ | * if the line graph is too noisy (too many things, not enough clear labels), consider doing a bar graph instead. | ||
+ | * you can, optionally, choose to bypass running brute once it surpasses a certain threshold; in my example, I set a threshold of 4 seconds, which is why you do not see results provided for 8192, as it'll have exceeded the limit during the 4096 run. | ||
Here is the wikipedia page: | Here is the wikipedia page: | ||
Line 86: | Line 94: | ||
*: | *: | ||
*: | *: | ||
- | *: | + | *: |
</ | </ | ||
haas/spring2024/comporg/projects/pnc2.1713024326.txt.gz · Last modified: 2024/04/13 12:05 by wedge