Talk:Sieve of Eratosthenes: Difference between revisions

Line 238:
 
::::: WillNess: I've fixed some of the indentation problems, and also removed the <code>#lang lazy</code> from partial sources (they're misleading, since the <code>#lang</code> should be used at the top of a module and determines its language, it's not just a typographical annotation of the text...). As for the speed, factors are obviously not interesting in theory, and high factors are interesting in practice only. But I didn't measure them or tried to analyze the runtime, I just tried a few semi-long runs since I'm too lazy to invest more time in this... You're welcome to do more detailed analysis of course (and to mention it: something that I didn't do since I didn't put in the effort...). Oh, and btw, my <code>when-bigger</code> trick is to avoid calling another function that will call itself recursively to collect two values, since this kind of thing would be disastrously slow in Lazy Racket (I should know, I implemented it...). My solution was a haskell-span-like function that takes a callback for the tail, which is enough here, and should generally be fast enough and clear. --[[User:Elibarzilay|Elibarzilay]] ([[User talk:Elibarzilay|talk]]) 05:45, 15 September 2014 (UTC)
 
::::::yes, I know (both about the implementation :) and the meaning of the function). I even wanted to rename it <code>span</code>. -- [[User:WillNess|WillNess]] ([[User talk:WillNess|talk]]) 10:59, 15 September 2014 (UTC)
751

edits