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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Sloc Cloc and Code – What Happened on the Way to Faster Cloc

66 点作者 msangi将近 7 年前

5 条评论

boyter将近 7 年前
Nice to see this hitting the front page. None of my submissions of it ever did. Happy to answer any questions about it here should they come up.<p>Certainly the biggest thing I took away from this was that the GC in Go is a far larger overhead than you would think, even for something that runs in 30ms.
评论 #17233588 未加载
评论 #17236223 未加载
fouc将近 7 年前
I was reading this and I was wondering that perhaps it would be better define a line as &quot;80 characters of code&quot;, and measure by characters, then divide by 80 to get lines of code.<p>The whole point of measuring lines of code is to get some sense of the complexity of the code base, but if what if one code base has lots of short lines, and another code base has lots of long lines. How would this be resolved?
评论 #17235709 未加载
评论 #17235892 未加载
评论 #17235443 未加载
superdimwit将近 7 年前
Could you try and reorder the state checks to occur with decreasing state-transition probability? I.e. if I am currently in code, it is most likely that I will be in code next state as well, a bit less likely that I&#x27;ll be in a single line comment, and even less likely that I&#x27;ll be in a multiline comment. If I&#x27;m in a multiline comment, I will most likely be in a multiline comment next, or code, but unlikely to be in a single line comment.<p>Amongst a few equiprobable state transitions, ordering the checks by increasing expense might also help.
评论 #17236650 未加载
llogiq将近 7 年前
One thing the linked ripgrep post doesn&#x27;t tell you is that line counting is also done with SIMD since it started using bytecount (<a href="https:&#x2F;&#x2F;github.com&#x2F;llogiq&#x2F;bytecount" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;llogiq&#x2F;bytecount</a>) some months ago, which sped up some workloads with line numbers considerably.
merb将近 7 年前
well the cost estimate is a little bit funny. Probably inaccurate :D<p>&gt; Estimated Schedule Effort 25.879043 months<p>&gt; Estimated People Required 18.118657<p>Well I&#x27;m working alone on the project for 4 years...
评论 #17253928 未加载