Skip to content
HomeVideosBooksBlogs
AllTop postsTopics
Podcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K
    J

    Jan Hubicka

    hubicka.blogspot.com · Personal blog · on HN since 2014

    Jan Hubicka, a GCC developer, writes about link-time and interprocedural optimization, devirtualization, and benchmarking big programs like Firefox and LibreOffice.

    Visit blogHN submissions
    Languages & CompilersSystems & Performance
    What HN says

    HN links him as the authority on GCC devirtualization and LTO. Commenters cite his posts, and one points to his GCC 9 post as more current.

    Stats for nerds
    25HN people shared it
    21linked in comments
    728story points
    Jan 2026last shared
    2014people per year2026

    Top posts on HN

    1. 1
      Firefox 64 built with GCC and Clang
      2 people · 198 points · first shared 2018 · 63 comments on HN
    2. 2
      GCC 8 Link Time and Interprocedural Optimization
      1 person · 143 points · first shared 2018 · 8 comments on HN
    3. 3
      Even more fun with building and benchmarking Firefox with GCC and Clang
      1 person · 100 points · first shared 2018 · 33 comments on HN
    4. 4
      Link-time optimization in GCC, part 3 – LibreOffice
      1 person · 100 points · first shared 2014 · 19 comments on HN
    5. 5
      Link time and inter-procedural optimization improvements in GCC 5
      1 person · 65 points · first shared 2015 · 3 comments on HN
    6. 6
      Clang compiles much slower and bigger Firefox binaries than GCC 8/9
      3 people · 51 points · first shared 2018 · 3 comments on HN
    7. 7
      Devirtualization in C++, part 6 – asking user for help
      1 person · 31 points · first shared 2014 · Discussion on HN
    8. 8
      GCC 9: Link-time and inter-procedural optimization improvements
      6 people · 12 points · first shared 2019 · 1 comments on HN
    9. 9
      Devirtualization in C++, Part 7 (Enforcing One Definition Rule)
      1 person · 8 points · first shared 2014 · Discussion on HN
    10. 10
      Building libreoffice with GCC 6 and LTO
      5 people · 6 points · first shared 2016 · Discussion on HN

    What HN people wrote when they linked it

    • pcwaltonJun 2014

      > Most our perf issues were with limiting draw calls and optimizing shaders, not method calling.

      Sounds like the work done by tree traversals weren't high overhead in general for your workload. But it does matter for some workloads.

      > Similarly, I worked a lot on a browser engine in the past and virtual method dispatch was again not this clear cut performance killer.

      We're seeing large gains from, as far as we can tell, having fewer virtual method calls than other engines. Eliminating virtual dispatch opens up a huge range of call-site optimizations since the methods can often be statically inlined (as well as reducing the load on the branch target buffer).

      > Similarly, I worked a lot on a browser engine in the past and virtual method dispatch was again not this clear cut performance killer.

      That doesn't match my experience. Devirtualization opens up lots of inlining opportunities, and inlining is one of the most critical optimizations that compilers can do (mostly because of the other optimizations that it opens up; e.g. const propagation, GVN, etc. etc.)

      See this study: http://hubicka.blogspot.com/2014/04/devirtualization-in-c-part-5-feedback.html

      Devirtualization optimizations improve Dromaeo by 7-8%. That's a significant win, especially since devirtualization is only a best-effort optimization and Dromaeo has a lot of JS in it.

    • azakaiApr 2016

      Yes, LLVM was designed with speed in mind. However, look at how much faster compile times are in JS VMs compared to LLVM; LLVM's slow compile times are why none of them use it, even though they tried (e.g. WebKit which is dropping LLVM). A lot of SSA-based JITs are just a lot faster than LLVM.

      I think it's a matter of tradeoffs. LLVM has multiple IRs on the way to machine code, some quite large, which let it emit pretty good output, on par with gcc. But other designs are possible that avoid a lot of that overhead, and can be far faster than LLVM, like JS VMs, B3 [1] and SubZero [2]. And clang is overall more or less comparable with gcc these days in terms of speed, it's no longer clearly faster [3] (although that also takes into account the frontend).

      With all that said, I agree with you that making such a decision without talking to LLVM is a little silly. But, I doubt it would change the outcome: If Go wants fast compile times, has the resources to write its own compiler, and is ok with trading off throughput for compile time, then it's a reasonable decision to avoid LLVM.

      [1] https://webkit.org/blog/5852/introducing-the-b3-jit-compiler/

      [2] https://github.com/stichnot/subzero

      [3] http://hubicka.blogspot.com/2016/03/building-libreoffice-with-gcc-6-and-lto.html

    • uxcnJan 2016

      Not that I prefer Java where performance is important, but profile based optimization combined with optimizing across translation units is non-trivial. C/C++ compilers have been increasing support for these more recently. Jan Hubicka's blog has a good example [1].

      I have to wonder if they plan to keep the codebase portable though. One of the major benefits of Java was that nearly everything has a JVM.

      [1] http://hubicka.blogspot.com/2014/04/linktime-optimization-in-gcc-2-firefox.html

    • hubickaDec 2018

      It is Google's blogger.com. I am not very advanced user of it and generally just use whatever it provides for me.

      The link is off. This link http://hubicka.blogspot.com/2018/12/even-more-fun-with-building-and.html
      renders better in general.

      PS: I found it too ironic to mention in the blog, but I had to uninstall mobile firefox to get the two-level application needed to submit a patch :)). For some reason Google authentificator requires over 30MB to take a picture of bar code.

    • twoodfinNov 2016

      Some C++ compilers support "fast path" devirtualization via profiling feedback:

      http://hubicka.blogspot.com/2014/04/devirtualization-in-c-part-5-feedback.html

      As you suggest, it's a little misleading to talk about the runtime cost of a virtual or indirect function call in isolation. The most significant cost is often the resulting inability of the compiler to inline and perform further optimizations across the caller and callee.

    • Supersaiyan_IVAug 2020

      This article is way too outdated.

      Also, who the heck uses -flto on GCC 4.7.1? LTO is experimental in GCC 4.7.1 and will make any application nigh-impossible to debug.

      Here's something more relevant to modern times:
      http://hubicka.blogspot.com/2019/05/gcc-9-link-time-and-inter-procedural.html

    Related

    Red Hat Developer Blogdeveloperblog.redhat.com51 people

    Things to avoid in Docker containers

    Red Hat Developer Blog
    Company · last shared 2017
    LLVM Blogblog.llvm.org226 people

    Clang Is Now Used to Build Chrome for Windows

    LLVM Blog
    Company · last shared 2026
    ldpreloadldpreload.com34 people

    Finding a kernel regression in half an hour with git bisect run (2018)

    ldpreload
    Personal · last shared 2026
    Philipp Oppermannos.phil-opp.com95 people

    Learn Rust by writing a small OS

    Philipp Oppermann
    Personal · last shared 2026
    Simon Marlowcommunity.haskell.org/~simonmar17 people

    Parallel and concurrent Haskell, Marlow [[PDF slide deck]]

    Simon Marlow
    Personal · last shared 2017
    Nicholas Nethercotennethercote.github.io65 people

    Twenty years of Valgrind

    Nicholas Nethercote
    Personal · last shared 2026
    Paul Khuongpvk.ca106 people

    SBCL: The Ultimate Assembly Code Breadboard

    Paul Khuong
    Personal · last shared 2026
    Krister Walfridssonkristerw.blogspot.com53 people

    Useful GCC warning options not enabled by -Wall -Wextra

    Krister Walfridsson
    Personal · last shared 2026