Skip to main content

Timeline for Strange performance difference

Current License: CC BY-SA 3.0

13 events
when toggle format what by license comment
Feb 14, 2014 at 12:35 history edited WhiteEyeTree CC BY-SA 3.0
added 2 characters in body
Feb 14, 2014 at 4:15 comment added DSM Aside: don't use is not 0, use != 0; is tests identity, and you want to test equality. It's only an implementation detail that it works at all.
Feb 14, 2014 at 2:06 history edited Winston Ewert CC BY-SA 3.0
added 4 characters in body
Feb 14, 2014 at 0:00 history edited Jamal CC BY-SA 3.0
added 7 characters in body; edited tags; edited title
Feb 13, 2014 at 22:45 vote accept WhiteEyeTree
Feb 13, 2014 at 22:36 comment added WhiteEyeTree True that! Being lazy almost never pays back. Thank you!
Feb 13, 2014 at 22:33 comment added Gareth Rees Putting 1 into plist forces you to write the loop as for div in plist[1:]: whereas if you left it out you could write for div in plist: and avoid the copy.
Feb 13, 2014 at 22:28 comment added WhiteEyeTree Yeah you're right, the number 1 has been excluded from the prime numbers. We can say that the number 1 is kind of inconvenient for the mathematical pattern of prime numbers, we can say that you can factor any non prime number into a product of primes, like: 24 = 3 * 2^3. If we include the 1 we can write it like: 24 = 3 * 2^3 * 1^153 and nothing would change. But 1 still remains a prime afterall because he follow the general rules nPrime = 1 x nPrime ( 1 = 1 x 1 ). I just don't care being this formal for this little algorithm :)
Feb 13, 2014 at 21:43 comment added Gareth Rees 1 is not a prime.
Feb 13, 2014 at 21:39 answer added Sisnett timeline score: 5
Feb 13, 2014 at 20:04 review First posts
Feb 13, 2014 at 21:17
Feb 13, 2014 at 19:51 history edited Jamal CC BY-SA 3.0
deleted 10 characters in body
Feb 13, 2014 at 19:45 history asked WhiteEyeTree CC BY-SA 3.0