News for hackers. Stuff that matters.
Re:Functional programming is finally going mainstream by mholyland on Tuesday July 12, 2022 @05:41PM (#32076040)
Are you considering the speed of persistent data structures, that have the same big-O as their mutable counterparts? [0]

0. https://en.wikipedia.org/wiki/Persistent_data_structure

Re:Functional programming is finally going mainstream by Avshalom on Tuesday July 12, 2022 @05:52PM (#32076162)
Algorithmic complexity isn't the same as speed.
Re:Functional programming is finally going mainstream by mholyland on Tuesday July 12, 2022 @06:57PM (#32076855)
True. My use of the word "speed" is incorrect, or at least imprecise.

The parent comment claimed that immutable data structures are slow, because you would have to copy them around, an O(N) operation.

I wanted to know if they considered that operations on immutable structures can be done without copying, and have the same algorithmic complexity as the mutable data structures, if they used persistent data structures.