函数式编程和多核架构 [英] Functional programming and multicore architecture

查看:26
本文介绍了函数式编程和多核架构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在某处读到函数式编程适合利用计算中的多核趋势.我没有真正明白这个想法.和 lambda 演算和冯诺依曼架构有关系吗?

I've read somewhere that functional programming is suitable to take advantage of multi-core trend in computing. I didn't really get the idea. Is it related to the lambda calculus and von neumann architecture?

推荐答案

函数式编程可以最小化或消除副作用,因此更适合分布式编程.即多核处理.

Functional programming minimizes or eliminates side effects and thus is better suited to distributed programming. i.e. multicore processing.

换句话说,可以在不同的内核上同时独立解决许多难题,而不必像在其他编程风格中一样担心一个操作对另一个操作的影响.

In other words, lots of pieces of the puzzle can be solved independently on separate cores simultaneously without having to worry about one operation affecting another nearly as much as you would in other programming styles.

这篇关于函数式编程和多核架构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆