Go vs Scala (JVM)

polaris · · 643 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>I&#39;m currently working on a game engine that uses a lot of bitwise operations. Will Golang out perform the JVM because of it&#39;s compilation to machine code or is the JVM well optimized enough to perform on the same level as a compiled-to-machine-code language? Does the extra overhead the Scala compiler introduces make a (large enough) difference? </p> <p>I&#39;d love to hear some thoughts on this.</p> <p>Thanks</p> <hr/>**评论:**<br/><br/>drvd: <pre><p>Stop thinking and guessing and start measuring relistic loads. Good luck!</p></pre>mixedCase_: <pre><p>They&#39;re about on par. On some workloads Scala will be better than Go and vice versa.</p> <p>Do note that Go 1.7 is going to improve Go&#39;s performance significantly and will probably beat or be equal to JVM languages.</p> <p>That said, the JVM has received a ridiculously insane amount of engineering work towards optimizing it.</p> <p>Go 1.0 was released 4 years ago and there are many versions planned before hitting 2.0. Plus, it&#39;s a much simpler language. I would be very surprised if a couple or more years from now Go doesn&#39;t end up in a whole different ballpark performance-wise.</p></pre>bmurphy1976: <pre><p>I don&#39;t know how anybody could possibly answer this question for you. There are so many unknowns and unknowables that the only realistic way is for you to answer the question yourself: build a prototype and see what works best. Also, keep in mind, given that you claim to be building a &#34;game engine&#34;, it&#39;s quite possible that the answer will be &#34;neither.&#34;</p> <p>Experiment, then analyze, then build.</p></pre>Sythe2o0: <pre><p>One thing you might want to take into account is how much memory management you want to do-- gc pause times will probably be a big concern for keeping frame rate up in your engine. I&#39;d recommend measuring or researching pause time comparisons between Java and Go.</p></pre>zippoxer: <pre><p>Measure it yourself.</p></pre>ibib90: <pre><p>I really have no idea what is faster but i strongly suppose that when you use the <a href="https://golang.org/doc/asm" rel="nofollow">golang asm</a> library that you will outperform java.</p> <p>But i dont know if its within your constrains.</p></pre>

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

643 次点击  
加入收藏 微博
0 回复
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传