TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Go vs Java: Decoding Billions of Integers Per Second

21 点作者 zhenjl超过 11 年前

4 条评论

zhenjl超过 11 年前
I just finished updating the code with an assembly version of a hot function (finding the leading "1" bit position) and updated the blog to reflect the improvements. In general I saw a 3-40% performance increase using the assembly version, which I borrowed from math/big/arith_*.s. The reason for the wide range is because it depended on the size of the delta integers being processed.
zhenjl超过 11 年前
2013-11-17 Update #2: Tried another new trick. This time I updated the leading bit position function, when using the gccgo compiler, to use libgcc’s __clzdi2 routine. This had the same effect as the update #1 except it’s for when gccgo is used. Performance increase ranged from 0% to 20% for encoding only. Thanks dgryski on reddit and minux on the golang-nuts mailing list.
LocalMan超过 11 年前
Did you use any parallelism/concurrency? There ought to be a way to speed up the Go version with parallelism. This is fair as that is one of Go's strengths.
评论 #6826412 未加载
cordite超过 11 年前
The images do not work for me.
评论 #6743925 未加载