News for hackers. Stuff that matters.
Re:Node-fib: Fast non-blocking fibonacci server by bascule on Monday October 03, 2011 @03:43PM (#3067689)
If I try to ask for a large number (say 1 million) I run out of RAM:

  $ node app.js 
  FATAL ERROR: CALL_AND_RETRY_2 Allocation failed - process out of memory
Somehow you're using O(n) RAM to do the calculation. Seems bad bro.

This code is the epitome of roflscale

Re:Node-fib: Fast non-blocking fibonacci server by Wilfred on Monday October 03, 2011 @05:36PM (#3068197)
That's a consequence of memoisation. It scales better than the original code though.

Still, the original point (node is cooperatively multitasked) was clear. Anything beyond that and I just want to reach for better Fibonacci algorithms.

Re:Node-fib: Fast non-blocking fibonacci server by logancapaldo on Monday October 03, 2011 @07:38PM (#3068693)
And this is why, any cache without an eviction policy and/or size limitation is bad (and memoization _is_ a cache). I shudder every time I see a "magical" memoization function whose interface is just

   memo function-to-memoize