Hacker News new | past | comments | ask | show | jobs | submit login

The difference is that if you're doing functional programming with vectors as the fundamental data type (rather than scalars in linked lists), then the implementation could be hyper optimized underneath the programmer to maximize computational throughout. Whereas with imperative for loops, the implementation is somewhat fixed because python, C, and C++ force you to choose row (array of struct), or columnar (struct of arrays). R prefers struct of arrays, and makes arrays of struct a very difficult and horribly unacceptable slow. But if you are willing to use higher order functions, R makes struct of arrays suuuuuper fast. Python/C/C++ make arrays of structs the "default", by programmer culture if not by language/runtime capabilities.



Also I always find it's so easy to make everything data parallel if you program in a functional way.

Sure it might not be the most efficient implementation possible, but due to the ease of parallelizing, you are more likely to just try it out.




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

Search: