I’m experimenting with Haskell profiling with a simple recursive max algorithm: When I compare it to a python imperative equivalent, I get a 10x speed factor in favor of python: It seems there is an inherent limitation of using tail recursion in the Haskell case, am I right? Any other way to make the Haskell code faster? The input file
Tag: haskell
Tree levels in lazy Python using “Long zip with”
In this blog post about breadth-first traversal, Gibbons talks about implementing BFT with “long zip with” function Then for instance My question: My version of levels in Python is working, but my lazy version using generators is not. It’s adding an extra [] level at the end. Why? I consider this practice for using generators and laziness in Python, and