3 ms·
No, the lazy evaluation in Haskell would make it difficult to reason about the runtime performance in his case. The conclusion is to use tightly packed data st
by ww520 11y ago
No, the lazy evaluation in Haskell would make it difficult to reason about the runtime performance in his case.
The conclusion is to use tightly packed data structure to take advantage of the cache locality of the modern CPU for high performance requirement. That can be done in most languages.
- HelloNurse 11y agoIt can be done less easily in Haskell, because even if arrays are available (albeit as second-class citizens) and hopefully well packed, the actual structure and memory layout of their elements is an implementation detail (and, in practice, it tends to be unusually pointer-rich because it has to support lazy evaluation).