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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

How newlines affect Linux kernel performance

287 点作者 tbodt超过 6 年前

5 条评论

zbjornson超过 6 年前
v8 (before v5.9) used to only inline functions that were under 600 characters (and 196 AST nodes). That was another fun way to add fuel to the tab vs. spaces fire: identical functions that used spaces instead of tabs could run significantly slower because they weren't inlined.
评论 #18170726 未加载
ndesaulniers超过 6 年前
__builtin_constant_p is a rats nest of edge cases. We're looking into differences between implementation from gcc and clang now for the kernel.
评论 #18172009 未加载
rurban超过 6 年前
I&#x27;d really like to see a comparison with clang&#x27;s inliner. In my cases [1] gcc constexpr support was always horrible and clang decent. So I&#x27;m not sure if using the builtin assembler would fix the gcc situation.<p>1: <a href="https:&#x2F;&#x2F;github.com&#x2F;rurban&#x2F;safeclib&#x2F;blob&#x2F;master&#x2F;tests&#x2F;perf_memcpy_s.c" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;rurban&#x2F;safeclib&#x2F;blob&#x2F;master&#x2F;tests&#x2F;perf_me...</a>
评论 #18182028 未加载
amelius超过 6 年前
Seems like those competitions where people write one-liners have their merits.
评论 #18173130 未加载
评论 #18172129 未加载
jwilk超过 6 年前
Ugh, all external links in this article go through the Google click tracker. :-&#x2F;<p>Here are ungoogled URLs:<p><a href="https:&#x2F;&#x2F;elixir.bootlin.com&#x2F;linux&#x2F;v4.17&#x2F;source&#x2F;include&#x2F;linux&#x2F;jhash.h#L70" rel="nofollow">https:&#x2F;&#x2F;elixir.bootlin.com&#x2F;linux&#x2F;v4.17&#x2F;source&#x2F;include&#x2F;linux&#x2F;...</a><p><a href="https:&#x2F;&#x2F;elixir.bootlin.com&#x2F;linux&#x2F;v4.17&#x2F;source&#x2F;include&#x2F;net&#x2F;dst.h#L442" rel="nofollow">https:&#x2F;&#x2F;elixir.bootlin.com&#x2F;linux&#x2F;v4.17&#x2F;source&#x2F;include&#x2F;net&#x2F;ds...</a><p><a href="https:&#x2F;&#x2F;elixir.bootlin.com&#x2F;linux&#x2F;v4.17&#x2F;source&#x2F;include&#x2F;linux&#x2F;thread_info.h#L121" rel="nofollow">https:&#x2F;&#x2F;elixir.bootlin.com&#x2F;linux&#x2F;v4.17&#x2F;source&#x2F;include&#x2F;linux&#x2F;...</a><p><a href="https:&#x2F;&#x2F;c9x.me&#x2F;x86&#x2F;html&#x2F;file_module_x86_id_318.html" rel="nofollow">https:&#x2F;&#x2F;c9x.me&#x2F;x86&#x2F;html&#x2F;file_module_x86_id_318.html</a><p><a href="https:&#x2F;&#x2F;elixir.bootlin.com&#x2F;linux&#x2F;v4.17&#x2F;source&#x2F;arch&#x2F;x86&#x2F;include&#x2F;asm&#x2F;bug.h#L33" rel="nofollow">https:&#x2F;&#x2F;elixir.bootlin.com&#x2F;linux&#x2F;v4.17&#x2F;source&#x2F;arch&#x2F;x86&#x2F;inclu...</a><p><a href="https:&#x2F;&#x2F;gcc.gnu.org&#x2F;onlinedocs&#x2F;gcc-4.0.1&#x2F;gcc&#x2F;Extended-Asm.html" rel="nofollow">https:&#x2F;&#x2F;gcc.gnu.org&#x2F;onlinedocs&#x2F;gcc-4.0.1&#x2F;gcc&#x2F;Extended-Asm.ht...</a><p><a href="https:&#x2F;&#x2F;www.embecosm.com&#x2F;appnotes&#x2F;ean10&#x2F;ean10-howto-llvmas-1.0.html#idp109760" rel="nofollow">https:&#x2F;&#x2F;www.embecosm.com&#x2F;appnotes&#x2F;ean10&#x2F;ean10-howto-llvmas-1...</a><p><a href="https:&#x2F;&#x2F;patchwork.kernel.org&#x2F;patch&#x2F;10450037&#x2F;" rel="nofollow">https:&#x2F;&#x2F;patchwork.kernel.org&#x2F;patch&#x2F;10450037&#x2F;</a><p><a href="https:&#x2F;&#x2F;lkml.org&#x2F;lkml&#x2F;2018&#x2F;10&#x2F;4&#x2F;25" rel="nofollow">https:&#x2F;&#x2F;lkml.org&#x2F;lkml&#x2F;2018&#x2F;10&#x2F;4&#x2F;25</a><p><a href="https:&#x2F;&#x2F;elixir.bootlin.com&#x2F;linux&#x2F;v4.17&#x2F;source&#x2F;include&#x2F;linux&#x2F;slab.h#L699" rel="nofollow">https:&#x2F;&#x2F;elixir.bootlin.com&#x2F;linux&#x2F;v4.17&#x2F;source&#x2F;include&#x2F;linux&#x2F;...</a><p><a href="https:&#x2F;&#x2F;gcc.gnu.org&#x2F;onlinedocs&#x2F;gcc&#x2F;Other-Builtins.html" rel="nofollow">https:&#x2F;&#x2F;gcc.gnu.org&#x2F;onlinedocs&#x2F;gcc&#x2F;Other-Builtins.html</a><p><a href="https:&#x2F;&#x2F;elixir.bootlin.com&#x2F;linux&#x2F;v4.17&#x2F;source&#x2F;arch&#x2F;x86&#x2F;kvm&#x2F;vmx.c#L9669" rel="nofollow">https:&#x2F;&#x2F;elixir.bootlin.com&#x2F;linux&#x2F;v4.17&#x2F;source&#x2F;arch&#x2F;x86&#x2F;kvm&#x2F;v...</a><p><a href="https:&#x2F;&#x2F;elixir.bootlin.com&#x2F;linux&#x2F;v4.17&#x2F;source&#x2F;arch&#x2F;x86&#x2F;kvm&#x2F;vmx.c#L706" rel="nofollow">https:&#x2F;&#x2F;elixir.bootlin.com&#x2F;linux&#x2F;v4.17&#x2F;source&#x2F;arch&#x2F;x86&#x2F;kvm&#x2F;v...</a>
评论 #18170285 未加载
评论 #18178086 未加载