TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

How newlines affect Linux kernel performance

287 pointsby tbodtover 6 years ago

5 comments

zbjornsonover 6 years ago
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 未加载
ndesaulniersover 6 years ago
__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 未加载
rurbanover 6 years ago
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 未加载
ameliusover 6 years ago
Seems like those competitions where people write one-liners have their merits.
评论 #18173130 未加载
评论 #18172129 未加载
jwilkover 6 years ago
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 未加载