HackerPapers

HN 二十年,最值得读的论文。

从 Hacker News 2006 年以来的全部投稿里,挑出链接本身就是论文的帖子:arXiv、期刊、会议论文、技术报告。每篇附中文标题,讨论最热的那些再加上中文导读和高赞评论翻译。

从必读开始
  • 8,000+篇被 HN 讨论过的论文

Essential

必读 30 篇

在论文库里看全部精选

编辑精选里 HN 讨论最热的 30 篇,每篇都有中文导读。不知道从哪读起,就从这里开始。

  1. 正在载入论文…

Archive

论文库

点柱子按年份筛选。注:源数据里 2023 年的帖子分数记录不全,2026 年尚未过完,这两年收录偏少。

难度
排序

    About

    这些论文是怎么挑出来的

    1. 01

      全量扫一遍

      读取 Hacker News 自 2006 年以来的全部 446 万条链接投稿,找出指向 arXiv、期刊、会议、技术报告和学术 PDF 的帖子。

    2. 02

      只留论文本身

      由 AI 逐条判断,剔除介绍论文的新闻、博客和幻灯片,同一篇论文的多次投稿合并计算,并统计它在评论区被引用的次数。

    3. 03

      写导读、译评论

      讨论最热的 1,500 篇配上中文导读,并精选、翻译 HN 高赞评论。导读由 AI 生成,可能有误,请以原文为准。

    编程语言与软件工程2011days2011.scala-lang.org

    Google 比较 C++、Java、Scala 和 Go 性能的论文

    Google paper comparing performance of C++, Java, Scala, and Go

    进阶 · 约 40 分钟读完前置知识:编程语言基础、编译器基础、性能分析基础

    读论文 HN 讨论
    255HN 得分
    151条评论
    3次投稿

    导读

    这是 Google 的一篇论文:作者用四种语言(C++、Java、Scala、Go)实现同一个编译器算法(循环头识别),先写朴素的标准版本,再请各语言专家写出高度调优的版本,比较运行性能、内存占用以及各自所需的调优代价。结论是 C++ 性能领先但调优最费劲,且很多优化技巧超出普通程序员水平;Java 实现最简单但 GC 相关性能最难分析;Scala 代码最简洁;Go 语言特性不错但当时编译器尚不成熟,性能与二进制体积都受影响。

    HN 关注点:跨语言性能基准与“调优代价”这一维度:C++ 是否真的胜出、表格里 Scala 专家版是否用了更聪明的算法、以及老论文在语言新版本下是否还成立。

    关键词 C++GoScala性能基准

    HN 评论精选

    这几条评论里:质疑 2 补充 2

    补充引用论文结论:C++ 最快但调优成本最高,Java/Scala 受 GC 困扰,Go 编译器不成熟。

    他们的结论:性能上 C++ 大幅胜出,但它也需要最广泛的调优工作,其中许多优化达到了普通程序员难以企及的精细程度。Scala 的简洁记法和强大语言特性使得代码复杂度得到最佳优化。Java 版本大概最容易实现,但性能分析最难,尤其是垃圾回收相关的影响复杂且难以调优;由于 Scala 跑在 JVM 上,也有同样的问题。Go 提供了有趣的语言特性,记法简洁且标准化,但其编译器当时还不成熟,这在性能和二进制体积上都有体现。

    tectonic查看英文原文

    Their conclusions: "We find that in regards to performance, C++ wins out by a large margin. However, it also required the most extensive tuning efforts, many of which were done at a level of sophistication that would not be available to the average programmer. Scala concise notation and powerful language features allowed for the best optimization of code complexity. The Java version was probably the simplest to implement, but the hardest to analyze for performance. Specifically the effects around garbage collection were complicated and very hard to tune. Since Scala runs on the JVM, it has the same issues. Go offers interesting language features, which also allow for a concise and standardized notation. The compilers for this language are still immature, which reflects in both performance and binary sizes."

    补充点出论文最有价值的部分:朴素实现与各语言专家调优版本的对比及其调优代价。

    概括:作者用直接、规范的方式在 C++、Java、Scala 和 Go 中实现了同一个复杂的编译器算法(循环头识别),测量了性能和内存占用;而论文最有趣的部分是,他让各语言的专家同事写出高度调优的优化版本,并报告了每种语言优化需要付出什么代价。

    pgbovine查看英文原文

    summary: author implemented a sophisticated compiler algorithm (loop header recognition) in a straightforward canonical way in C++, Java, Scala, and Go, measured performance/memory usage, and then (the most interesting part of the paper) he had colleagues who were experts in each respective language write highly-tuned optimized versions and reported on what it took to optimize in each language.

    质疑质疑基准表:Scala 专家版用了算法上更优的做法,表格未标注,容易误导读者。

    他们居然在表格里直接放那些数字,而“Scala 专家版”其实在算法上做了更聪明的事,这让我很震惊。论文里注明了这一区别,但表格里应该标出来,因为我相信 99% 的人不会注意到。太草率了!

    aria查看英文原文

    Really shocked they would place numbers in a table like that when the 'Scala Pro' version is doing something algorithmically smarter. They note in the paper this distinction, but it should be marked in the table, because I'm sure 99% of people don't see that. Sloppy!

    质疑质疑“普通程序员难以企及的调优”到底指 Google 内部数据结构还是论文列出的常规优化技巧。

    “性能上 C++ 大幅胜出,但它也需要最广泛的调优工作,其中许多优化达到了普通程序员难以企及的精细程度。”我是 C++ 粉丝,所以喜欢前半句(C++ 胜出,这并不意外)。但不清楚他们说的“精细程度”指的是 Google 内部数据结构,还是第六节 D 部分列出的那些优化?其中很多对 C++ 程序员并不意外(比如尽量用 hash_map、vector 而非 list,把数据结构初始化移到循环外并复用等等)。总体而言,我非常感谢他们的努力和分享结果。

    ksolanki查看英文原文

    We find that in regards to performance, C++ wins out by a large margin. However, it also required the most extensive tuning efforts, many of which were done at a level of sophistication that would not be available to the average programmer. I am a fan of C++, so I liked the first part (that C++ wins, which is not really surprising). However it was not clear if the sophistication they talk about is regarding the Google's internal data-structures or the list of optimizations listed in Section VI-D? Many of these optimizations are not big surprises to a C++ programmer (where possible use hash_map, vector instead of list, initialize data structure outside of loop and try to reuse, and so on). Overall, I do greatly appreciate the effort and their sharing the results.

    相关资源

    从这篇论文所有 HN 讨论帖的全部评论里整理出来的链接。

    代码

    历次讨论

    同领域还值得读

    1. Google 的软件工程(2017)

      Software Engineering at Google (2017)

      介绍了 Google 的软件工程实践,包括其单一代码库(monorepo)、几乎全部开发在主干进行而非分支、代码审查、构建系统 Blaze、协议缓冲区等工具与流程,并讨论了频繁重…

      编程语言与软件工程2017 · 1,127 分 · 465 评 · 引用 15入门 · 约 45 分钟编辑精选
    2. Peter Naur:编程作为理论构建 (1985)

      Peter Naur – Programming as Theory Building (1985)

      Peter Naur 1985 年的经典论文《Programming as Theory Building》提出:编程的本质不是写代码或文档,而是在程序员头脑中构建对程序及其运行…

      编程语言与软件工程2016 · 629 分 · 74 评入门 · 约 45 分钟编辑精选
    3. SciPy 1.0:Python 科学计算的基础算法

      SciPy 1.0: fundamental algorithms for scientific computing in Python

      这篇发表于 Nature Methods 的论文介绍了 SciPy 1.0——Python 科学计算生态的基石库,涵盖其核心算法模块(优化、积分、插值、线性代数等)、软件架构与社…

      编程语言与软件工程2020 · 387 分 · 98 评入门 · 约 45 分钟编辑精选
    4. Lisp 的历史(1979)

      History of Lisp (1979)

      这是 Lisp 发明者 John McCarthy 于 1979 年为 HOPL(编程语言史)会议撰写的回顾文章,讲述 Lisp 的起源、设计动机与早期演进,文中也涉及 if 表…

      编程语言与软件工程2018 · 352 分 · 44 评入门 · 约 45 分钟编辑精选
    5. 使用 NumPy 进行数组编程

      Array Programming with NumPy

      这篇 Nature 文章介绍 NumPy 的数组编程模型及其在科学计算中的核心作用:以 ndarray 为中心,通过向量化操作让 Python 高效处理多维数组。

      编程语言与软件工程2020 · 318 分 · 134 评入门 · 约 40 分钟编辑精选

    打赏支持

    打赏二维码

    觉得有用,请作者喝杯咖啡。

    WeChat

    关注向阳乔木

    微信公众号「向阳乔木推荐看」

    微信公众号「向阳乔木推荐看」二维码

    微信扫一扫;在微信里打开本页时,长按二维码识别。