Hadoop 上的 Java 与 Python [英] Java vs Python on Hadoop
问题描述
我正在开发一个使用 Hadoop 的项目,它似乎在本地结合了 Java 并为 Python 提供流支持.选择其中之一是否会对性能产生重大影响?我在这个过程中足够早,如果有显着的性能差异,我可以采用任何一种方式.
I am working on a project using Hadoop and it seems to natively incorporate Java and provide streaming support for Python. Is there is a significant performance impact to choosing one over the other? I am early enough in the process where I can go either way if there is a significant performance difference one way or the other.
推荐答案
Java 的动态性不如 Python,并且在其 VM 中投入了更多精力,使其成为一种速度更快的语言.Python 还受到其全局解释器锁的限制,这意味着它无法将单个进程的线程推送到不同的内核.
Java is less dynamic than Python and more effort has been put into its VM, making it a faster language. Python is also held back by its Global Interpreter Lock, meaning it cannot push threads of a single process onto different core.
这是否会产生任何显着差异取决于您打算做什么.我怀疑这两种语言都适合你.
Whether this makes any significant difference depends on what you intend to do. I suspect both languages will work for you.
这篇关于Hadoop 上的 Java 与 Python的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!