3 ms·
I'd like to point out that by the time this article was posted, and thanks to some constructive discussion about the approach, the node-fib "project" on github
by glenjamin 15y ago
I'd like to point out that by the time this article was posted, and thanks to some constructive discussion about the approach, the node-fib "project" on github has been updated with a much faster recursive approach which doesn't use loads of memory and doesn't resort to memoisation, but still doesn't block the loop and serves almost as many requests/sec.
My point here, and in writing the lib in the first place was that naive implementations are naive in any language/vm. I lump splitting an algorithm across the loop into the same band as deciding this task should spawn a thread/worker. And using child processes as workers is still an option in node.