
2 Nov
2009
2 Nov
'09
4:42 p.m.
On Mon, Nov 02, 2009 at 02:10:12PM -0700, Jason Dagit wrote:
If you are okay with Int, then maybe you're also happy with Int32 or Word32. If so, why don't you use template haskell to build the list at compile time? If you do that, then getting the kth prime at run-time is O(k). Take that AKS! :)
Silly you! If he's into TH than he may just create an -- god forbid -- array and get the kth prime in O(1). :) -- Felipe.