Functional programming is not capable of achieving absolute top performance

I don’t really understand what your question has to do with functional programming?

Functional programming and functional datastructures are the discipline of programming in a world of non-overwriting memory.

This is an extremely good fit for certain settings, like e.g. flash memory / SSD (which are genuinely non-overwriting memory for physical reasons) or some distributed systems. You may consider it also a good fit for some single-node multi-core settings (it helps preventing tug-of-war between cores about who owns a cache-line).

Many filesystems like ZFS are effectively functional programming (implemented in the C language, but that’s just cosmetics).

I’d argue that functional programming is less good of a fit for “normal” hardware architecture day-to-day programming – standard CPUs and DRAM are actually pretty OK with overwriting memory.

And you pay a lot of complexity and performance for functional programming (i.e. for avoiding to overwrite memory). This is sometimes worth it, and functional programming languages can help you deal with this added complexity. But if you don’t have a very good reason for this constraint, it makes zero sense to abide by it.

1 Like