Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
High performance in Python and Haskell (Bryan O'Sullivan presentation slides) (bos.github.com)
8 points by crntaylor on Oct 20, 2012 | hide | past | favorite | 5 comments


So it seems speed in Python is inversely proportional to readability, in his experience.

One performance aspect of Python often overlooked is its functional programming features, which can make your code both faster and easier to read.


I'm not experienced enough to know how much you can speed up your Python code by using functional features (I presume you man map, reduce, lambdas etc?) but given that the author has made a bit of a career out of making functional languages fast, I expect that he's considered it.


Yeah that's what I mean. List comprehensions are faster than StringIO for string manipulation, for example. I always like to read about real-world applications of this stuff, the presentation was very interesting nonetheless.


i don't really see the connection between python and haskell here. is it meant to be a comparison (then: implying that haskell is somehow making it easier to have speedy and nicely readable code)?


I think his point (on the final slide) is that in Python, writing fast code means not using the high-level language features that make it pleasant to write, whereas writing fast code in Haskell (sometimes) means using higher level language features, meaning that it's still pleasant to write.

I don't have enough experience in writing highly optimized Python to know whether that's true or not.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: