3 ms·
Im hearing that for the first time, could you elaborate?
by Pica_soO 10y ago
Im hearing that for the first time, could you elaborate?
- mping 10y agoI'm guessing it is easier to optimize via imperative way than functional. Although you can optimize functional libs up to a point, I say that people with enough time and dedication will probably optimize better with imperative paradigm. OTOH not a lot of projects require uber optimizations.
- pjmlp 10y agoThe issue is that imperative algorithms and data structures are easier to optimize for hardware regarding cache sizes, memory access patterns and memory reuse. Whereas this is also possible in FP languages, but since they tend to abstract the hardware, it requires support from "clever" compilers. I don't fully agree with him, given the previous experience with the Connection Machine and *Lisp, but as usual in computing, unless one doesn't implement something and prove it with benchmarks, it doesn't happen. https://en.wikipedia.org/wiki/Connection_Machine https://en.wikipedia.org/wiki/Connection_Machine
- youdontknowtho 10y agoActually, that was one of his major points in the lecture that I referenced. Basically, you should start with measurements and go from there. He said that he personally uses FP quite a bit, so he wasn't a hater per se...except for FP fan boys. He did go on about that quite a bit. The main thing that he stressed about data structures was that memory layout matters in that hardware has a lot of built in intelligence for accelerating memory access patterns that it can discern. The way that immutable data structures are created, updated, and destroyed don't produce a suitably detectable memory access pattern, apparently. His explanation was detailed and is worth watching. That being said he wasn't proposing "share state for all". He was mainly proposing the scientific method.