3 ms·
Would this be useful for environments where extreme performance is necessary, such as Fibonacci API servers?
by tomdale 15y ago
Would this be useful for environments where extreme performance is necessary, such as Fibonacci API servers?
- tenderlove 15y agoOnly if you're reading Fibonacci numbers from an I/O. Fibur only allows concurrency while doing I/O operations.
- raggi 15y agoNot true!, it will keep the response time interquartile range small, providing a consistent user experience!
- wycats 15y agoWe can use the technique first described here https://github.com/glenjamin/node-fib https://github.com/glenjamin/node-fib by using Fibur.pass. def fib(n) Fibur.pass return n if (0..1).include? n fib(n-1) + fib(n-2) if n > 1 end Now, if you wrap this in Fibur.new, you will get parallel operation!
- raggi 15y agoBro, you get parallel operation anyway, that Fibur.pass just added scheduler overhead. The whole point of Fibur is you don't need to use #pass!!!