From: Randolph Wang <rywang@CS.Princeton.EDU>
Date: Mon, 16 Feb 2004 21:07:42 -0500
To: precept6@CS.Princeton.EDU
Cc: randy_class@CS.Princeton.EDU
Subject: diego@CS.Princeton.EDU: Prime counting hint for speed
------- Start of forwarded message -------
Date: Mon, 16 Feb 2004 15:41:52 -0500 (EST)
From: Diego Nehab <diego@CS.Princeton.EDU>
To: Donna Gabai <dgabai@CS.Princeton.EDU>
cc: Chi Zhang <chizhang@CS.Princeton.EDU>, Doug Clark <doug@CS.Princeton.EDU>,
Paul T Calamia <pcalamia@CS.Princeton.EDU>,
Randolph Wang <rywang@CS.Princeton.EDU>,
Yilei Shao <yshao@CS.Princeton.EDU>
Subject: Prime counting hint for speed
In-Reply-To: <Pine.GSO.4.58.0402142256570.22642@raygun.CS.Princeton.EDU>
X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on
memphis.CS.Princeton.EDU
X-Spam-Status: No, hits=-100.0 required=5.0 tests=USER_IN_WHITELIST
autolearn=no version=2.63
X-Spam-Level:
X-Status:
X-Keywords:
X-UID: 41
Hi,
I just told all my students that if they want to compare
a < Math.sqrt(b)
they might prefer using
a*a < b
to make the code faster. One of them came to me complaining his "prime
counting" program was taking 5min rather than the advertised 1min, and I
had to give it away. Actually, Doug mentioned this in class. I just
refreshed their memory.
[]s,
Diego.
------- End of forwarded message -------
diego@CS.Princeton.EDU: Prime counting hint for speed / Randolph Wang