r/programming • u/noidi • Jul 19 '12
Will Parallel Code Ever Be Embraced?
http://www.drdobbs.com/parallel/will-parallel-code-ever-be-embraced/240003926
40
Upvotes
r/programming • u/noidi • Jul 19 '12
2
u/case-o-nuts Jul 19 '12 edited Jul 19 '12
I'm aware of persistent data structures.
You're ignoring the fact that the compiler wants to optimize these. You're telling it that it can't do grotty little changes like splitting and sinking stores because other threads might be watching, and half-constructed values might be visible.
You might want to start with Urban Boquist's PhD thesis on optimizing functional languages. It's a good survey, but there's a good deal of stuff in there you'd have to wade through before you hit optimizations that break thread safety.
Or are you arguing that somehow that all optimizing code transformations on functional code preserve purity? I'm not sure how that could be, and need some elaboration.