# inlining

Inlining is a compiler optimization that integrates a function's code into its callers to eliminate function-call overhead and potentially improve execution speed.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## NetWasm 0.10 Speeds Up C# on WebAssembly, Now Faster Than Mono AOT

DevFeed: [NetWasm 0.10 Speeds Up C# on WebAssembly, Now Faster Than Mono AOT](<https://devfeed.tech/articles/netwasm-0-10-speeds-up-c-on-webassembly-now-faster-than-mono-aot-142922.md>)

Original publisher: [Read original article](<https://www.infoq.com/news/2026/11/NetWasm-0-10-Faster/>)

Author: Edin Kapić

Published: 2026-11-19T09:00:00Z

Content type: news

Language: en

Sources: [InfoQ](<https://devfeed.tech/sources/infoq.md>)

Topics: [WebAssembly](<https://devfeed.tech/topics/web-assembly.md>), [inlining](<https://devfeed.tech/topics/inlining.md>), [vectorization techniques](<https://devfeed.tech/topics/vectorization-techniques.md>), [Exception](<https://devfeed.tech/topics/exception.md>), [toolchain](<https://devfeed.tech/topics/toolchain.md>)

Tags: [aot](<https://devfeed.tech/tags/aot.md>), [arithmetic](<https://devfeed.tech/tags/arithmetic.md>), [benchmark](<https://devfeed.tech/tags/benchmark.md>), [benchmarks](<https://devfeed.tech/tags/benchmarks.md>), [c-sharp](<https://devfeed.tech/tags/c-sharp.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [desktop](<https://devfeed.tech/tags/desktop.md>), [development](<https://devfeed.tech/tags/development.md>), [dotnet](<https://devfeed.tech/tags/dotnet.md>), [exception-handling](<https://devfeed.tech/tags/exception-handling.md>), [faster](<https://devfeed.tech/tags/faster.md>), [mono](<https://devfeed.tech/tags/mono.md>), [net](<https://devfeed.tech/tags/net.md>), [net-11](<https://devfeed.tech/tags/net-11.md>), [netwasm-0-10-faster](<https://devfeed.tech/tags/netwasm-0-10-faster.md>), [news](<https://devfeed.tech/tags/news.md>), [simd](<https://devfeed.tech/tags/simd.md>), [wasi](<https://devfeed.tech/tags/wasi.md>), [webassembly](<https://devfeed.tech/tags/webassembly.md>)

### AI overview

NetWasm 0.10's compiler optimizations made it faster than Mono AOT on the project's benchmark set: across 2,213 cases, version 0.10.8 at O3 with NetWasmGC took 0.41 times Mono AOT's time as a geometric mean, excluding five cases where Mono's LLVM removed the work. Changes across releases 0.10.1-0.10.8 included shared exception handling, inlining and redundant bounds-check removal, 128-bit WebAssembly SIMD with scalar fallback, and reuse of division results for remainder and range checks. The excerpt reports gains on quicksort, DoomSharp, and a vectorized fluid-equation solver, while desktop .NET 11 RC3 remained faster overall at 0.87 times NetWasm's time. Results used Wasmtime 49.0.3 on one Apple M1 Max; the authors note measurement sensitivity to function alignment, slower vector performance than desktop .NET, specific slow operations, and a NewtR regression.

### Source excerpt

Summary: NetWasm, an ahead-of-time compiler from C# to WebAssembly, has reworked exception handling, bounds-check elimination, SIMD and division in its 0.10 series. Across more than 2000 benchmark cases, the project reports running in 0.41 times the time of Mono AOT's WASI build. By Edin Kapić

## Dissecting an Unexplored SASS Control-Code Field: Barrier Exemption and Programmable Warp Priority

DevFeed: [Dissecting an Unexplored SASS Control-Code Field: Barrier Exemption and Programmable Warp Priority](<https://devfeed.tech/articles/dissecting-an-unexplored-sass-control-code-field-barrier-exemption-and-programmable-warp-priority-142981.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2611.24437>)

Author: Ziwen Wang, Qi Luo, Kunlin Li, Changxi Liu, Dongsheng Wang, Yun Chen

Published: 2026-11-19T05:00:00Z

Content type: article

Language: en

Sources: [arXiv: Distributed Computing](<https://devfeed.tech/sources/arxiv-distributed-computing.md>)

Topics: [Robotics](<https://devfeed.tech/topics/robotics.md>), [code analysis](<https://devfeed.tech/topics/code-analysis.md>), [inlining](<https://devfeed.tech/topics/inlining.md>)

Tags: [binaries](<https://devfeed.tech/tags/binaries.md>), [control](<https://devfeed.tech/tags/control.md>), [cs-ar](<https://devfeed.tech/tags/cs-ar.md>), [cs-dc](<https://devfeed.tech/tags/cs-dc.md>), [cs-pf](<https://devfeed.tech/tags/cs-pf.md>), [exemption](<https://devfeed.tech/tags/exemption.md>), [llm-inference](<https://devfeed.tech/tags/llm-inference.md>), [nvidia](<https://devfeed.tech/tags/nvidia.md>), [optimizations](<https://devfeed.tech/tags/optimizations.md>), [priority](<https://devfeed.tech/tags/priority.md>), [sass](<https://devfeed.tech/tags/sass.md>), [scheduling](<https://devfeed.tech/tags/scheduling.md>), [warp](<https://devfeed.tech/tags/warp.md>)

### AI overview

The unexplored SASS control-code field governs two independent scheduling mechanisms: EXEMPT lets instructions blocked by a pending barrier issue during the wait, while START, TILE, and END move warps among three hardware priority levels. The study uses instruction-level microbenchmarks to identify when these mechanisms can improve performance and applies them through a post-compilation binary optimizer, without changing source code or the compiler. Across six GPUs spanning four architectures, optimizations improve representative kernels by up to 31.9%; production kernels in llama.cpp and vLLM by up to 5.4%; and end-to-end LLM inference by up to 3.6%.

### Source excerpt

arXiv:2611.24437v1 Announce Type: cross Abstract: Every instruction in NVIDIA's native GPU ISA (SASS) carries a control code that guides hardware scheduling, and prior work has decoded its known fields to optimize GPU kernels. However, one control-code field remains unexplored: it appears over 500000 times in NVIDIA's closed-source libraries such as cuBLAS and cuDNN, yet nvcc never emits it when compiling user programs. This paper presents the first systematic study of this control-code field across GPU architectures from Volta to Blackwell. Using instruction-level microbenchmarks, we show that the field controls two independent hardware mechanisms: barrier exemption (EXEMPT), which allows instructions blocked by a pending barrier to issue early during the barrier wait, and programmable warp priority (START, TILE, and END), which moves warps across three priority levels in the hardware scheduler. We identify the conditions under which each mechanism improves GPU kernel performance and implement a post-compilation binary optimizer that places these marks directly in compiled binaries without modifying source code or the compiler. Evaluated across six GPUs spanning four architectures, our optimizations speed up representative kernels by up to 31.9%, and the optimizer accelerates production kernels in llama.cpp and vLLM by up to 5.4% and end-to-end LLM inference by up to 3.6%.

## C++ Optimizations in MSVC Build Tools 14.52

DevFeed: [C++ Optimizations in MSVC Build Tools 14.52](<https://devfeed.tech/articles/c-optimizations-in-msvc-build-tools-14-52-138345.md>)

Original publisher: [Read original article](<https://devblogs.microsoft.com/cppblog/c-optimizations-in-msvc-build-tools-14-52/>)

Author: Troy Johnson

Published: 2026-11-17T18:23:46Z

Content type: article

Language: en

Sources: [C++ Team Blog](<https://devfeed.tech/sources/c-team-blog.md>)

Topics: [MSVC](<https://devfeed.tech/topics/msvc.md>), [c/c++](<https://devfeed.tech/topics/c-c-plus-plus.md>), [vectorization techniques](<https://devfeed.tech/topics/vectorization-techniques.md>), [Compilers and Linkers](<https://devfeed.tech/topics/compilers-and-linkers.md>), [inlining](<https://devfeed.tech/topics/inlining.md>)

Tags: [build-tools](<https://devfeed.tech/tags/build-tools.md>), [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [code-generation](<https://devfeed.tech/tags/code-generation.md>), [inlining](<https://devfeed.tech/tags/inlining.md>), [msvc](<https://devfeed.tech/tags/msvc.md>), [optimizations](<https://devfeed.tech/tags/optimizations.md>), [patterns](<https://devfeed.tech/tags/patterns.md>), [performance](<https://devfeed.tech/tags/performance.md>), [simd](<https://devfeed.tech/tags/simd.md>)

### AI overview

MSVC Build Tools 14.52 improves optimization across arithmetic reassociation, loops, ARM64 code generation, inlining, and expression patterns. Reassociation can expose shared calculations for hoisting and common-subexpression elimination; loop passes can replace repeated induction updates with final-value calculations and hoist eligible pure operations. ARM64 address analysis can share bases for indexed accesses and enable paired loads. SIMD changes include broader SLP recognition, NEON pattern simplification, and removal of work in unused lanes. Inlining heuristics now consider certain single-call helpers, slightly larger functions, and calls that enable scalar replacement of local aggregates. Pattern optimizations simplify Boolean expressions and equivalent comparisons or selections. Some changes originated in 14.51. The reciprocal-sharing transformation requires `/fp:fast` and is cost-based; floating-point reassociation also requires `/fp:fast`, and examples describe opportunities rather than guarantees.

### Source excerpt

C++ Optimizations in MSVC Build Tools 14.52 The Microsoft C++ team implemented new optimizations in MSVC Build Tools 14.52. Let's walk through examples of some of these optimizations. We will focus on reassociation, loop optimizations, SIMD code generation, inlining, and patterns. Where noted, we'll also include a few optimizations that appeared in MSVC 14.51 but [...] The post C++ Optimizations in MSVC Build Tools 14.52 appeared first on C++ Team Blog.

## DeCompCert: A Verified Decompiler for CompCert-Generated AArch64

DevFeed: [DeCompCert: A Verified Decompiler for CompCert-Generated AArch64](<https://devfeed.tech/articles/decompcert-a-verified-decompiler-for-compcert-generated-aarch64-136043.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2611.18055>)

Author: Swarn Priya, Basavesh Ammanaghatta Shivakumar, Thomas Gilray, Kristopher Micinski

Published: 2026-11-16T05:00:00Z

Content type: article

Language: en

Sources: [arXiv: Cryptography and Security](<https://devfeed.tech/sources/arxiv-cryptography-and-security.md>)

Topics: [code analysis](<https://devfeed.tech/topics/code-analysis.md>), [inlining](<https://devfeed.tech/topics/inlining.md>)

Tags: [assembly](<https://devfeed.tech/tags/assembly.md>), [behavior](<https://devfeed.tech/tags/behavior.md>), [c](<https://devfeed.tech/tags/c.md>), [call](<https://devfeed.tech/tags/call.md>), [cs-cr](<https://devfeed.tech/tags/cs-cr.md>), [cs-pl](<https://devfeed.tech/tags/cs-pl.md>), [decompiler](<https://devfeed.tech/tags/decompiler.md>), [experiments](<https://devfeed.tech/tags/experiments.md>), [function](<https://devfeed.tech/tags/function.md>), [ida](<https://devfeed.tech/tags/ida.md>), [inference](<https://devfeed.tech/tags/inference.md>), [native](<https://devfeed.tech/tags/native.md>), [ocaml](<https://devfeed.tech/tags/ocaml.md>), [optimized](<https://devfeed.tech/tags/optimized.md>), [pipelines](<https://devfeed.tech/tags/pipelines.md>), [platform](<https://devfeed.tech/tags/platform.md>), [quality](<https://devfeed.tech/tags/quality.md>), [recovery](<https://devfeed.tech/tags/recovery.md>), [safety](<https://devfeed.tech/tags/safety.md>), [semantic](<https://devfeed.tech/tags/semantic.md>), [translation](<https://devfeed.tech/tags/translation.md>), [validation](<https://devfeed.tech/tags/validation.md>)

### AI overview

DeCompCert reconstructs CompCert C from CompCert-generated AArch64 assembly through nine reverse passes. Untrusted OCaml and Datalog analyses suggest candidates; Rocq-verified transformations and validators accept only reconstructions satisfying semantic correspondence. The theorem ensures every defined, safe behavior of accepted C is matched by the input assembly, with observational equivalence under a safety assumption. In evaluation on about 2.16 million lines of C, exact function and call signatures enabled reconstruction and recompilation of all 3,173 eligible contexts across optimized and unoptimized pipelines. Without retained signatures, its inference portfolio validated 2,606 of 3,164 contexts (82.4%), compared with 2,407 (76.1%) for platform-plus-IDA. The abstract says further experiments assess native execution and output quality, and notes remaining limits in signature recovery and resemblance to original source.

### Source excerpt

arXiv:2611.18055v1 Announce Type: cross Abstract: DeCompCert is a Rocq-verified decompiler for AArch64 assembly generated by CompCert. It reconstructs CompCert C through nine reverse passes, combining deductively verified transformations with translation validation. Untrusted OCaml and Datalog analyses propose candidate reconstructions, while verified validators accept only candidates that satisfy the required semantic correspondence. The composed correctness theorem guarantees that every defined, safe behavior of an accepted C reconstruction is matched by the input CompCert assembly; under a safety assumption, the two programs are observationally equivalent. We evaluate DeCompCert on approximately 2.16 million lines of C. With exact function and call signatures, it reconstructs and recompiles all 3,173 eligible contexts under both unoptimized and optimized CompCert pipelines. Without retained signatures, its cumulative inference portfolio validates 2,606 of 3,164 contexts (82.4%), while the platform-plus-IDA configuration validates 2,407 contexts (76.1%). Native execution and output-quality experiments further evaluate the generated C and characterize the remaining limitations in signature recovery and source resemblance.

## Making profile-guided optimization reproducible

DevFeed: [Making profile-guided optimization reproducible](<https://devfeed.tech/articles/making-profile-guided-optimization-reproducible-122552.md>)

Original publisher: [Read original article](<https://fzakaria.com/2026/11/07/making-profile-guided-optimization-reproducible>)

Published: 2026-11-07T18:00:00Z

Content type: article

Language: en

Sources: [Farid Zakaria's Blog](<https://devfeed.tech/sources/farid-zakaria-s-blog.md>)

Topics: [Programming Languages / Compilers](<https://devfeed.tech/topics/programming-languages-compilers.md>), [Nix](<https://devfeed.tech/topics/nix.md>), [inlining](<https://devfeed.tech/topics/inlining.md>), [performance-optimization](<https://devfeed.tech/topics/performance-optimization.md>)

Tags: [amd](<https://devfeed.tech/tags/amd.md>), [binaries](<https://devfeed.tech/tags/binaries.md>), [block](<https://devfeed.tech/tags/block.md>), [blocks](<https://devfeed.tech/tags/blocks.md>), [boot](<https://devfeed.tech/tags/boot.md>), [branch](<https://devfeed.tech/tags/branch.md>), [bugs](<https://devfeed.tech/tags/bugs.md>), [build](<https://devfeed.tech/tags/build.md>), [builder](<https://devfeed.tech/tags/builder.md>), [builds](<https://devfeed.tech/tags/builds.md>), [cache](<https://devfeed.tech/tags/cache.md>), [clang](<https://devfeed.tech/tags/clang.md>), [clock](<https://devfeed.tech/tags/clock.md>), [closure](<https://devfeed.tech/tags/closure.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [compilers](<https://devfeed.tech/tags/compilers.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [performance](<https://devfeed.tech/tags/performance.md>), [pgo](<https://devfeed.tech/tags/pgo.md>), [profile](<https://devfeed.tech/tags/profile.md>)

### AI overview

Profile-guided optimization can improve performance, but its training run normally depends on machine conditions and thread scheduling, producing profiles and binaries that may differ across builds. The article makes PGO reproducible by running only the training step inside Rewind, a deterministic VM, while keeping the instrumented and final compiles as ordinary derivations. The profile is fixed by Rewind inputs such as epoch, seed, schedule, CPU model, and clock. Because Intel and AMD remain distinguishable inside the VM, training must be pinned to a CPU vendor and the derivation requires a matching builder feature. Reproducibility does not ensure a useful profile: the training workload and schedule should resemble expected production behavior. In the example, three of four schedules omit `compress` from training, while one yields an approximately even workload split.

### Source excerpt

Profile-guided optimization (PGO) is an easy way to speed up a program, especially if the workload is somewhat stable. In leaving performance on the table I built a profile-guided sqlite3 variant for a 1.32x speedup for our select workloads.

## Clojure 1.13.0-alpha10

DevFeed: [Clojure 1.13.0-alpha10](<https://devfeed.tech/articles/clojure-1-13-0-alpha10-95994.md>)

Original publisher: [Read original article](<https://clojure.org/news/2026/10/22/clojure-1-13-alpha10>)

Published: 2026-10-22T00:00:00Z

Content type: release

Language: en

Sources: [Clojure News](<https://devfeed.tech/sources/clojure-news.md>)

Topics: [Clojure](<https://devfeed.tech/topics/clojure.md>), [inlining](<https://devfeed.tech/topics/inlining.md>)

Tags: [clojure](<https://devfeed.tech/tags/clojure.md>), [programming](<https://devfeed.tech/tags/programming.md>)

### AI overview

Clojure 1.13.0-alpha10 adds a `:req!` destructuring directive for making top-level bindings required, including renamed and nested bindings. `:namespaced/keys[!]` now qualifies unqualified keywords; this may break code relying on prior alpha behavior for unqualified keys after `&`. Inlining is conditional: an inline definition can return `nil` to fall back to the function, and `get-in` now inlines with a literal vector of keys. Macro expansion preserves type hint tags, with invocation tags taking precedence when they conflict with expansion tags.

### Source excerpt

Clojure 1.13.0-alpha10 is now available! Find download and usage information on the Downloads page. Destructuring changes To make what were (implicitly optional) top-level bindings required, you can now move them into a map under a new :req! directive. This includes bindings to different names or nested destructuring, e.g. {a :long-a} ⇒ {:req! {a :long-a}}. :namespaced/keys[!] directives now qualify any unqualified keywords. Note that this may be a breaking change from the prior alphas for unqualified keys after the & where unqualified keys were not interpreted as qualified. Inliner updates and macro invocation tag preservation Previously, :inline on function definitions needed to work for all inlines. Inline is now conditional and the inline definition can return nil to indicate the function can't be inlined, and the non-inlined function should be used instead. get-in now inlines when passed a literal vector of keys. Type hint tag metadata is now preserved on macro expansion, which may be wrapped in a call to identity if needed. A type hint tag on the macro invocation will dominate one on the expansion when they disagree. Try it out Update your deps.edn :deps with: org.clojure/clojure {:mvn/version "1.13.0-alpha10"} Start a REPL with the Clojure CLI (any version) with: clj -Sdeps '{:deps {org.clojure/clojure {:mvn/version "1.13.0-alpha10"}}}'

## Value Classes Still Need Compiler Sympathy

DevFeed: [Value Classes Still Need Compiler Sympathy](<https://devfeed.tech/articles/value-classes-still-need-compiler-sympathy-15126.md>)

Original publisher: [Read original article](<https://inside.java/2026/08/24/value-classes-compiler-sympathy/>)

Author: Johan Sjölén

Published: 2026-08-24T00:00:00Z

Content type: article

Language: en

Sources: [Inside Java](<https://devfeed.tech/sources/inside-java.md>)

Topics: [Java](<https://devfeed.tech/topics/java.md>), [Project Valhalla](<https://devfeed.tech/topics/project-valhalla.md>), [JEP-401](<https://devfeed.tech/topics/jep-401.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>), [inlining](<https://devfeed.tech/topics/inlining.md>), [code analysis](<https://devfeed.tech/topics/code-analysis.md>)

Tags: [abi](<https://devfeed.tech/tags/abi.md>), [abstraction](<https://devfeed.tech/tags/abstraction.md>), [adapter](<https://devfeed.tech/tags/adapter.md>), [analysis](<https://devfeed.tech/tags/analysis.md>), [annotation](<https://devfeed.tech/tags/annotation.md>), [apply](<https://devfeed.tech/tags/apply.md>), [argument](<https://devfeed.tech/tags/argument.md>), [c2](<https://devfeed.tech/tags/c2.md>), [class](<https://devfeed.tech/tags/class.md>), [classes](<https://devfeed.tech/tags/classes.md>), [code](<https://devfeed.tech/tags/code.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [identity](<https://devfeed.tech/tags/identity.md>), [jep-401](<https://devfeed.tech/tags/jep-401.md>), [jvm](<https://devfeed.tech/tags/jvm.md>), [openjdk](<https://devfeed.tech/tags/openjdk.md>), [optimize](<https://devfeed.tech/tags/optimize.md>), [profiling](<https://devfeed.tech/tags/profiling.md>), [project-valhalla](<https://devfeed.tech/tags/project-valhalla.md>), [semantic](<https://devfeed.tech/tags/semantic.md>), [state](<https://devfeed.tech/tags/state.md>), [valhalla](<https://devfeed.tech/tags/valhalla.md>), [value](<https://devfeed.tech/tags/value.md>), [values](<https://devfeed.tech/tags/values.md>)

### AI overview

JDK 28's preview value classes can enable flattening and scalarization, but they do not guarantee faster code. The source shows that immutable final fields can hold large values in flattened form, while mutable fields may use references to preserve tear-free assignment. C2 can eliminate allocations in a value transformation loop; the comparable identity-record example retained allocations. A further allocation source is generic type erasure: a megamorphic call through an inherited `Object apply(Object)` descriptor forces scalarized values to be materialized as heap references. Explicitly redeclaring the typed method in the interface (`Carrier apply(LargeValue)`) lets values cross that dynamic call boundary scalarized; in the reported reproducer, allocation fell from 192 bytes per invocation to zero. The author recommends profiling and inspecting generated code because compiler optimizations depend on context.

### Source excerpt

Declaring a value class is first and foremost a semantic decision. It tells our fellow programmers that its instances are defined entirely by their state and do not need identity. That clearer model is valuable in itself! The JVM's additional freedom to optimize how those values are represented is a welcome bonus. C2 can do amazing things with that freedom, but it cannot always recover information hidden behind abstraction boundaries. Profiling and inspecting the generated code remain the best ways to understand what is happening. To get the best results, we may still need to have a little sympathy for the compiler.

## Profile-guided optimization in Go

DevFeed: [Profile-guided optimization in Go](<https://devfeed.tech/articles/profile-guided-optimization-in-go-29420.md>)

Original publisher: [Read original article](<https://lemire.me/blog/2026/08/09/profile-guided-optimization-in-go/>)

Author: Daniel Lemire

Published: 2026-08-09T23:17:36Z

Content type: article

Language: en

Sources: [Daniel Lemire](<https://devfeed.tech/sources/daniel-lemire.md>)

Topics: [Go Language](<https://devfeed.tech/topics/go-language.md>), [Optimization](<https://devfeed.tech/topics/optimization.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>), [inlining](<https://devfeed.tech/topics/inlining.md>), [JSON](<https://devfeed.tech/topics/json.md>)

Tags: [compiler](<https://devfeed.tech/tags/compiler.md>), [cpu](<https://devfeed.tech/tags/cpu.md>), [go](<https://devfeed.tech/tags/go.md>), [inlining](<https://devfeed.tech/tags/inlining.md>), [interface](<https://devfeed.tech/tags/interface.md>), [json](<https://devfeed.tech/tags/json.md>), [measurement](<https://devfeed.tech/tags/measurement.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [profile](<https://devfeed.tech/tags/profile.md>), [profiling](<https://devfeed.tech/tags/profiling.md>), [speed](<https://devfeed.tech/tags/speed.md>), [standard-library](<https://devfeed.tech/tags/standard-library.md>), [systems](<https://devfeed.tech/tags/systems.md>)

### AI overview

This article explains how profile-guided optimization in Go uses runtime measurements to guide compiler decisions such as inlining hot call sites and devirtualizing interface calls. It also describes a benchmark parsing three JSON documents with separately trained PGO builds and comparing their speed against a profile-free baseline.

### Source excerpt

When a compiler optimizes your program, it has to guess. Which functions are worth inlining? Which side of a branch is the common one? Which method does this interface call actually reach? At compile time it cannot know, so it uses heuristics. Profile-guided optimization (PGO) replaces the guessing with measurement: you run your program, record ... Continue reading Profile-guided optimization in Go

## Devirtualization and Static Polymorphism

DevFeed: [Devirtualization and Static Polymorphism](<https://devfeed.tech/articles/devirtualization-and-static-polymorphism-60974.md>)

Original publisher: [Read original article](<https://david.alvarezrosa.com/posts/devirtualization-and-static-polymorphism/>)

Author: David Álvarez Rosa

Published: 2026-02-25T09:45:00Z

Content type: tutorial

Language: en

Sources: [David Álvarez Rosa](<https://devfeed.tech/sources/david-alvarez-rosa.md>)

Topics: [Polymorphism](<https://devfeed.tech/topics/polymorphism.md>), [Compilers and Linkers](<https://devfeed.tech/topics/compilers-and-linkers.md>), [inlining](<https://devfeed.tech/topics/inlining.md>)

Tags: [compilation](<https://devfeed.tech/tags/compilation.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [compiler-flags](<https://devfeed.tech/tags/compiler-flags.md>), [cpp](<https://devfeed.tech/tags/cpp.md>), [inlining](<https://devfeed.tech/tags/inlining.md>), [performance](<https://devfeed.tech/tags/performance.md>), [polymorphism](<https://devfeed.tech/tags/polymorphism.md>)

### AI overview

The article explains how virtual dispatch can add pointer indirection, increase object size, and limit inlining. It describes compiler devirtualization and cross-translation-unit optimization, then recommends static polymorphism for latency-sensitive paths to reduce runtime dispatch cost.

### Source excerpt

Ever wondered why your "clean" polymorphic design underperforms in benchmarks? Virtual dispatch enables polymorphism, but it comes with hidden overhead: pointer indirection, larger object layouts, and fewer inlining opportunities. Compilers do their best to devirtualize these calls, but it isn't always possible. On latency-sensitive paths, it's beneficial to manually replace dynamic dispatch with static polymorphism, so calls are resolved at compile time and the abstraction has effectively zero runtime cost. Virtual dispatch § Runtime polymorphism occurs when a base interface exposes a virtual method that derived classes override. Calls made through a Base& are then dispatched to the appropriate override at runtime. Under the hood, a virtual table (vtable) is created for each class, and a pointer (vptr) to the vtable is added to each instance. Figure 1: Virtual dispatch diagram. The method foo is declared virtual in Base and overridden in Derived. Both classes get a vtable, and each object gets a vptr pointing to the corresponding vtable. On a virtual call, the compiler loads the vptr, selects the right slot in the vtable, and performs an indirect call through that function pointer. The drawback is that the extra vptr increases object size, and the indirection through the vtable makes the call hard to predict. This prevents inlining, increases branch mispredictions, and reduces cache efficiency. The best way to observe this phenomenon is by inspecting the assembly1 code emitted by the compiler for a minimal example class Base { public: auto foo() -> int; }; auto bar(Base* base) -> int { return base->foo() + 77; } For a non-virtual member function foo like in the example above, the free function bar issues a direct call bar(Base*): sub rsp, 8 call Base::foo() // Direct call add rsp, 8 add eax, 77 ret However, declaring foo as virtual changes bar's assembly into an indirect, vtable-based call bar(Base*): sub rsp, 8 mov rax, QWORD PTR [rdi] // vptr (pointer to vtable)

## Optimizing Jetpack Compose Transform Computations by Merging Functions

DevFeed: [Optimizing Jetpack Compose Transform Computations by Merging Functions](<https://devfeed.tech/articles/merge-your-computations-25612.md>)

Original publisher: [Read original article](<https://www.romainguy.dev/posts/2025/merge-your-computations/>)

Author: Romain Guy

Published: 2025-05-15T00:00:00Z

Content type: tutorial

Language: en

Sources: [Posts on Romain Guy](<https://devfeed.tech/sources/posts-on-romain-guy.md>)

Topics: [Code](<https://devfeed.tech/topics/code.md>), [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [inlining](<https://devfeed.tech/topics/inlining.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [code](<https://devfeed.tech/tags/code.md>), [compose](<https://devfeed.tech/tags/compose.md>), [developer](<https://devfeed.tech/tags/developer.md>), [function](<https://devfeed.tech/tags/function.md>), [graphics](<https://devfeed.tech/tags/graphics.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [inlining](<https://devfeed.tech/tags/inlining.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [merge](<https://devfeed.tech/tags/merge.md>), [performance](<https://devfeed.tech/tags/performance.md>)

### AI overview

This article explains how merging or manually inlining low-level functions can remove duplicated work in performance-sensitive code. Using Jetpack Compose matrix transformations as an example, it describes eliminating unnecessary temporary matrices and intermediate computations.

### Source excerpt

There is a simple but often overlooked technique to optimize performance-sensitive code: merging (or manually inlining) functions. We often build series of low-level functions that execute various computations that we then combine to perform higher-level tasks. When taken in isolation, each of those functions does exactly what it should and might even be perfectly optimized. However, when a series of thosefunctions work together, unnecessary or duplicated work might appear. Let's look at a concrete example taken from the Jetpack Compose code base. To apply the various geometric transforms that may affect a layer, Compose needs to build a matrix that combines all the transformations exposed by its APIs:

## Eliminating Array Bounds Checks

DevFeed: [Eliminating Array Bounds Checks](<https://devfeed.tech/articles/eliminating-array-bounds-checks-25610.md>)

Original publisher: [Read original article](<https://www.romainguy.dev/posts/2025/eliminating-array-bounds-checks/>)

Author: Romain Guy

Published: 2025-05-13T00:00:00Z

Content type: tutorial

Language: en

Sources: [Posts on Romain Guy](<https://devfeed.tech/sources/posts-on-romain-guy.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Memory Safety](<https://devfeed.tech/topics/memory-safety.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>), [Exception](<https://devfeed.tech/topics/exception.md>), [toolchain](<https://devfeed.tech/topics/toolchain.md>), [inlining](<https://devfeed.tech/topics/inlining.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [assembly](<https://devfeed.tech/tags/assembly.md>), [code](<https://devfeed.tech/tags/code.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [developer](<https://devfeed.tech/tags/developer.md>), [exception](<https://devfeed.tech/tags/exception.md>), [graphics](<https://devfeed.tech/tags/graphics.md>), [inlining](<https://devfeed.tech/tags/inlining.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [memory-safety](<https://devfeed.tech/tags/memory-safety.md>), [performance](<https://devfeed.tech/tags/performance.md>), [toolchain](<https://devfeed.tech/tags/toolchain.md>)

### AI overview

This tutorial explains how Android Runtime array bounds checks protect memory safety but can add unnecessary instructions. It shows how a simple explicit check can help the compiler eliminate those checks in a fixed-size array, reducing the example from 136 to 60 arm64 instructions.

### Source excerpt

The Android Runtime (ART) offers a nice memory safety feature when accessing the content of an array. The indices you use are automatically checked against the bounds of the array to prevent unsafe memory accesses. To achieve this, ART generates extra machine instructions to throw an ArrayIndexOutOfBoundsException when the index is invalid. Here is a simple Kotlin example: 1fun scaleZ(values: FloatArray, scale: Float) = values[2] * scale After translation to arm64 assembly, we obtain the following result:

## Micro-optimizations in Kotlin -- 2

DevFeed: [Micro-optimizations in Kotlin -- 2](<https://devfeed.tech/articles/micro-optimizations-in-kotlin-2-25600.md>)

Original publisher: [Read original article](<https://www.romainguy.dev/posts/2024/micro-optimizations-in-kotlin-2/>)

Author: Romain Guy

Published: 2024-01-16T00:00:00Z

Content type: tutorial

Language: en

Sources: [Posts on Romain Guy](<https://devfeed.tech/sources/posts-on-romain-guy.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Code](<https://devfeed.tech/topics/code.md>), [inlining](<https://devfeed.tech/topics/inlining.md>), [Android](<https://devfeed.tech/topics/android.md>), [Assembly](<https://devfeed.tech/topics/assembly.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [assembly](<https://devfeed.tech/tags/assembly.md>), [code](<https://devfeed.tech/tags/code.md>), [developer](<https://devfeed.tech/tags/developer.md>), [graphics](<https://devfeed.tech/tags/graphics.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [inlining](<https://devfeed.tech/tags/inlining.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [performance](<https://devfeed.tech/tags/performance.md>)

### AI overview

This article examines micro-optimizations for Kotlin's Float.sign and Double.sign APIs. It explains their handling of negative and positive values, signed zero, and NaN, then compares the Kotlin implementation with Android's generated AArch64 assembly. The article shows how inlining and intrinsics eliminate function calls and translate the implementation into bit manipulation.

### Source excerpt

In the previous post, we saw how we could micro-optimize Int.sign to save a few instructions. We are now going to turn to Float.sign (and by extension Double.sign). Float.sign returns the sign of single-precision float value as a single-precision float value. While similar to Int.sign, this API must handle a special cases: Not-a-Number (NaN). The exact behavior of the API is that it will return: -1.0f if the value is negative +/-0.0f if the value is zero (floats can encode both positive and negative zero) 1.0f if the value is positive NaN if the value is NaN An easy way to implement this API ourselves is to return the input when the input equals 0.0f or NaN, and to return the input's sign copied onto 1.0f otherwise. Translated to code, we can write:

## Interfaces 101 : Heap Escape Ep. 2

DevFeed: [Interfaces 101 : Heap Escape Ep. 2](<https://devfeed.tech/articles/interfaces-101-heap-escape-ep-2-22215.md>)

Original publisher: [Read original article](<https://www.ardanlabs.com/blog/2023/02/interfaces-101-heap-escape.html>)

Published: 2023-02-08T00:00:00Z

Content type: tutorial

Language: en

Sources: [William Kennedy](<https://devfeed.tech/sources/william-kennedy.md>)

Topics: [interface](<https://devfeed.tech/topics/interface.md>), [Software](<https://devfeed.tech/topics/software.md>), [escape analysis](<https://devfeed.tech/topics/escape-analysis.md>), [inlining](<https://devfeed.tech/topics/inlining.md>), [Type Parameter](<https://devfeed.tech/topics/type-parameter.md>), [Type Argument](<https://devfeed.tech/topics/type-argument.md>), [data type](<https://devfeed.tech/topics/data-type.md>)

Tags: [benchmark](<https://devfeed.tech/tags/benchmark.md>), [build](<https://devfeed.tech/tags/build.md>), [escape-heap](<https://devfeed.tech/tags/escape-heap.md>), [go](<https://devfeed.tech/tags/go.md>), [golang](<https://devfeed.tech/tags/golang.md>), [heap](<https://devfeed.tech/tags/heap.md>), [inlining](<https://devfeed.tech/tags/inlining.md>), [interfaces](<https://devfeed.tech/tags/interfaces.md>), [log-variables](<https://devfeed.tech/tags/log-variables.md>), [optimizations](<https://devfeed.tech/tags/optimizations.md>), [performance](<https://devfeed.tech/tags/performance.md>), [struct](<https://devfeed.tech/tags/struct.md>), [variable](<https://devfeed.tech/tags/variable.md>), [variables](<https://devfeed.tech/tags/variables.md>)

### AI overview

The episode examines how Go interfaces can affect performance by causing a function variable to escape to the heap. Using a weather struct and a function returning it, Miki demonstrates benchmarking, compiler optimization output, and Go build flags for identifying heap allocations. It also covers function comments that prevent compiler inlining and notes that Go logging functions accept interface arguments to make them more universal. The excerpt describes the episode's planned topics but does not provide benchmark results or quantify performance costs.

### Source excerpt

Introduction In episode 1, Miki had two functions that performed the similar operation, but returned different types. To refactor this, Miki rewrote both functions as a generic function that allowed him to specify the type to be returned during invocation. In some cases, the compiler may not recognise a type, thus, Miki gives a few pointers on manually telling a generic function which type to use. After demonstrating how to return different types with a generic function, Miki limited the types his generic function would accept with an interface.

## Performant A/B Testing with Cloudflare Workers

DevFeed: [Performant A/B Testing with Cloudflare Workers](<https://devfeed.tech/articles/performant-a-b-testing-with-cloudflare-workers-29520.md>)

Original publisher: [Read original article](<https://philipwalton.com/articles/performant-a-b-testing-with-cloudflare-workers/>)

Published: 2021-12-20T14:01:14Z

Content type: tutorial

Language: en

Sources: [Philip Walton](<https://devfeed.tech/sources/philip-walton.md>)

Topics: [A/B Testing](<https://devfeed.tech/topics/a-b-testing.md>), [Cloudflare Workers](<https://devfeed.tech/topics/cloudflare-workers.md>), [Latency](<https://devfeed.tech/topics/latency.md>), [inlining](<https://devfeed.tech/topics/inlining.md>)

Tags: [a-b-testing](<https://devfeed.tech/tags/a-b-testing.md>), [cloudflare-workers](<https://devfeed.tech/tags/cloudflare-workers.md>), [edge-computing](<https://devfeed.tech/tags/edge-computing.md>), [inlining](<https://devfeed.tech/tags/inlining.md>), [performance](<https://devfeed.tech/tags/performance.md>)

### AI overview

This tutorial explains how to run performant A/B tests with Cloudflare Workers at the edge. It discusses the performance costs of client-side and origin-based server-side testing and introduces a cookie-based approach for assigning users to experiment groups.

### Source excerpt

I think there's a perception in our industry that A/B testing is super complicated and you really need a tool or service to do it right. And while I'm sure some aspects of A/B are quite complex

## Smarter C/C++ inlining with \_\_attribute\_\_((flatten))

DevFeed: [Smarter C/C++ inlining with \_\_attribute\_\_((flatten))](<https://devfeed.tech/articles/smarter-c-c-inlining-with-attribute-flatten-38362.md>)

Original publisher: [Read original article](<https://awesomekling.github.io/Smarter-C++-inlining-with-attribute-flatten/>)

Author: Andreas Kling

Published: 2020-04-27T00:00:00Z

Content type: tutorial

Language: en

Sources: [Andreas Kling](<https://devfeed.tech/sources/andreas-kling.md>)

Topics: [inlining](<https://devfeed.tech/topics/inlining.md>), [c/c++](<https://devfeed.tech/topics/c-c-plus-plus.md>), [Optimization](<https://devfeed.tech/topics/optimization.md>), [clang](<https://devfeed.tech/topics/clang.md>), [gcc](<https://devfeed.tech/topics/gcc.md>), [build times](<https://devfeed.tech/topics/build-times.md>)

Tags: [build-times](<https://devfeed.tech/tags/build-times.md>), [c-c-plus-plus](<https://devfeed.tech/tags/c-c-plus-plus.md>), [clang](<https://devfeed.tech/tags/clang.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [cpp](<https://devfeed.tech/tags/cpp.md>), [function](<https://devfeed.tech/tags/function.md>), [gcc](<https://devfeed.tech/tags/gcc.md>), [inlining](<https://devfeed.tech/tags/inlining.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [performance](<https://devfeed.tech/tags/performance.md>), [technical](<https://devfeed.tech/tags/technical.md>)

### AI overview

This post explains how to use the __attribute__((flatten)) function attribute in C/C++ to apply aggressive inlining selectively. GCC and Clang support the attribute, which inlines a function's callees while limiting the program-size, cache-locality, and build-time costs of broader inlining.

### Source excerpt

This post describes a compile-time technique for getting the benefits of aggressive inlining in hot code while protecting cool code from its downsides.

## Closing the gap: cross-language LTO between Rust and C/C++

DevFeed: [Closing the gap: cross-language LTO between Rust and C/C++](<https://devfeed.tech/articles/closing-the-gap-cross-language-lto-between-rust-and-c-c-43066.md>)

Original publisher: [Read original article](<https://blog.llvm.org/2019/09/closing-gap-cross-language-lto-between.html>)

Author: Michael Woerister

Published: 2019-09-19T05:15:00Z

Content type: tutorial

Language: en

Sources: [LLVM Project](<https://devfeed.tech/sources/the-llvm-project-blog.md>)

Topics: [Rust](<https://devfeed.tech/topics/rust.md>), [LLVM](<https://devfeed.tech/topics/llvm.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>), [Optimization](<https://devfeed.tech/topics/optimization.md>), [C++](<https://devfeed.tech/topics/c-plus-plus.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [C](<https://devfeed.tech/topics/c.md>), [inlining](<https://devfeed.tech/topics/inlining.md>)

Tags: [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [compilation](<https://devfeed.tech/tags/compilation.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [firefox](<https://devfeed.tech/tags/firefox.md>), [inlining](<https://devfeed.tech/tags/inlining.md>), [llvm](<https://devfeed.tech/tags/llvm.md>), [lto](<https://devfeed.tech/tags/lto.md>), [mozilla](<https://devfeed.tech/tags/mozilla.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [rust](<https://devfeed.tech/tags/rust.md>)

### AI overview

This article explains cross-language link-time optimization in LLVM, showing how Rust and C/C++ codebases can be optimized across language boundaries, including cross-language function inlining.

### Source excerpt

Link time optimization (LTO) is LLVM's way of implementing whole-program optimization. Cross-language LTO is a new feature in the Rust compiler that enables LLVM's link time optimization to be performed across a mixed C/C++/Rust codebase. It is also a feature that beautifully combines two respective strengths of the Rust programming language and the LLVM compiler platform: Rust, with its lack of a language runtime and its low-level reach, has an almost unique ability to seamlessly integrate with an existing C/C++ codebase, and LLVM, as a language agnostic foundation, provides a common ground where the source language a particular piece of code was written in does not matter anymore. So, what does cross-language LTO do? There are two answers to that: From a technical perspective it allows for codebases to be optimized without regard for implementation language boundaries, making it possible for important optimizations, such as function inlining, to be performed across individual compilation units even if, for example, one of the compilation units is written in Rust while the other is written in C++. From a psychological perspective, which arguably is just as important, it helps to alleviate the nagging feeling of inefficiency that many performance conscious developers might have when working on a piece of software that jumps back and forth a lot between functions implemented in different source languages. Because Firefox is a large, performance sensitive codebase with substantial parts written in Rust, cross-language LTO has been a long-time favorite wish list item among Firefox developers. As a consequence, we at Mozilla's Low Level Tools team took it upon ourselves to implement it in the Rust compiler. To explain how cross-language LTO works it is useful to take a step back and review how traditional compilation and "regular" link time optimization work in the LLVM world. Background - A bird's eye view of the LLVM compilation pipelineClang and the Rust compiler bot

## Optimising Dash.el

DevFeed: [Optimising Dash.el](<https://devfeed.tech/articles/optimising-dash-el-22016.md>)

Original publisher: [Read original article](<http://www.wilfred.me.uk/blog/2017/07/29/optimising-dash-el/>)

Author: Wilfred Hughes

Published: 2017-07-29T00:00:00Z

Content type: article

Language: en

Sources: [Wilfred Hughes](<https://devfeed.tech/sources/wilfred-hughes.md>)

Topics: [Benchmark](<https://devfeed.tech/topics/benchmark.md>), [inlining](<https://devfeed.tech/topics/inlining.md>)

Tags: [benchmark](<https://devfeed.tech/tags/benchmark.md>), [dash](<https://devfeed.tech/tags/dash.md>), [performance](<https://devfeed.tech/tags/performance.md>)

### AI overview

The excerpt shows why Emacs Lisp optimizations need measurement: in the reported benchmark, `mapcar` beats an iterative `dolist` version across the tested list sizes, despite creating a closure. For functions equivalent to primitives, a wrapper adds substantial overhead; `defalias` is much closer to direct primitive use, and the byte-compiler's `byte-opcode` property can make `-first-item` indistinguishable from `car`, though this also means it cannot be advised. The byte-compiler can also evaluate calls on literals when a function is annotated pure, and remove unused calls annotated as having no side effects. The article recommends benchmarking, disassembling functions, and consulting other Emacs users. The excerpt says the latest Dash.el version includes these improvements.

### Source excerpt

Dash.el is a lovely library, and one of the most popular on MELPA. If we can squeeze every last drop of performance out of it, everyone benefits. Let's take a look at the black art of making elisp faster. Measure First! Chris Wellons has a great optimisation blog post that discusses the performance overhead of creating lambdas with mapcar. If we look at --map, it does indeed create anonymous functions: (defmacro --map (form list) "Anaphoric form of `-map'." `(mapcar (lambda (it) ,form) ,list)) Creating anonymous functions instantiates a closure, which isn't free. Let's write an iterative equivalent: (defmacro --map-loop (form list) (declare (debug (form form))) (let ((result-sym (make-symbol "result"))) `(let (,result-sym) (dolist (it ,list) (push ,form ,result-sym)) (nreverse ,result-sym)))) List Length mapcar (seconds) dolist (seconds) 1 0.000010 0.000028 1,000 0.0027 0.0079 100,000 0.74 1.24 (Full benchmark code here.) Surprisingly, mapcar is consistently faster in this particular benchmark! Other Emacsers have observed dolist outperforming mapcar for short lists. mapcar is primitive, and primitives tend to be fast. dolist clearly isn't a speedup in all situations. Let's try something else. Matching Primitive Performance Some dash.el functions are equivalent to primitive functions. For example, -first-item is equivalent to car, -drop is equivalent to nthcdr. We could write -first-item like this: (defun -first-item (lst) (car lst)) However, this adds the overhead of an extra function call compared with calling car directly. Instead, dash.el does this: (defalias '-first-item 'car) Let's do a small benchmark, to ensure that defalias giving us the peformance we want: Approach time (seconds) wrapper function 0.1399 alias 0.0055 use car directly 0.0050 (Full benchmark code here.) For shame! Our alias still isn't as fast as using the primitive. Let's compare the disassembly using M-x disassemble. (defalias 'car-alias 'car) (defun use-car-alias (x) (car-alias x)) ;; byte

## Implementing Critical CSS on your website

DevFeed: [Implementing Critical CSS on your website](<https://devfeed.tech/articles/implementing-critical-css-on-your-website-31272.md>)

Original publisher: [Read original article](<https://nystudio107.com/blog/implementing-critical-css>)

Author: andrew@nystudio107.com (Andrew Welch)

Published: 2017-02-28T21:34:00Z

Content type: tutorial

Language: en

Sources: [nystudio107](<https://devfeed.tech/sources/nystudio107-articles-on-modern-web-development.md>)

Topics: [Web Development](<https://devfeed.tech/topics/web-development.md>), [Front end](<https://devfeed.tech/topics/frontend.md>), [inlining](<https://devfeed.tech/topics/inlining.md>), [render](<https://devfeed.tech/topics/render.md>), [Website](<https://devfeed.tech/topics/website.md>)

Tags: [article](<https://devfeed.tech/tags/article.md>), [browser](<https://devfeed.tech/tags/browser.md>), [critical](<https://devfeed.tech/tags/critical.md>), [development](<https://devfeed.tech/tags/development.md>), [essential](<https://devfeed.tech/tags/essential.md>), [frontend](<https://devfeed.tech/tags/frontend.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [implementing](<https://devfeed.tech/tags/implementing.md>), [inlining](<https://devfeed.tech/tags/inlining.md>), [insights](<https://devfeed.tech/tags/insights.md>), [modern](<https://devfeed.tech/tags/modern.md>), [modern-web-development](<https://devfeed.tech/tags/modern-web-development.md>), [performant](<https://devfeed.tech/tags/performant.md>), [render](<https://devfeed.tech/tags/render.md>), [shows](<https://devfeed.tech/tags/shows.md>), [website](<https://devfeed.tech/tags/website.md>)

### AI overview

This tutorial explains Critical CSS, a method for extracting the CSS needed for above-the-fold content and inlining it so the browser can render the page immediately. It presents the technique as part of building performant websites.

### Source excerpt

Implementing Critical CSS is an essential part of modern website development, this article shows you how to do it

## Final fields

DevFeed: [Final fields](<https://devfeed.tech/articles/final-fields-27264.md>)

Original publisher: [Read original article](<https://blog.pchudzik.com/201612/final-fields/>)

Published: 2016-12-03T00:00:00Z

Content type: tutorial

Language: en

Sources: [Paweł Chudzik](<https://devfeed.tech/sources/pawe-chudzik.md>)

Topics: [Hibernate](<https://devfeed.tech/topics/hibernate.md>), [Java](<https://devfeed.tech/topics/java.md>), [inlining](<https://devfeed.tech/topics/inlining.md>), [Optimization](<https://devfeed.tech/topics/optimization.md>)

Tags: [bytecode](<https://devfeed.tech/tags/bytecode.md>), [hibernate](<https://devfeed.tech/tags/hibernate.md>), [inlining](<https://devfeed.tech/tags/inlining.md>), [java](<https://devfeed.tech/tags/java.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [trace](<https://devfeed.tech/tags/trace.md>)

### AI overview

This tutorial explains how private final fields can be modified through reflection, including how Hibernate uses the technique to hydrate final entity fields. It also demonstrates how Java compile-time constants and inlining can cause modified primitive final fields to behave unexpectedly, while object fields such as Long can reflect the changed value.

### Source excerpt

Private final field modification is possible and it doesn't require a lot of work. Since you should not use this mechanism in real life there are cases when it is useful. For example this how is Hibernate using this to hydrate final entity fields. But when using final fields with Hibernate you should be extra careful how you declare them. Read more

## LLVM Weekly - #120, Apr 18th 2016

DevFeed: [LLVM Weekly - #120, Apr 18th 2016](<https://devfeed.tech/articles/llvm-weekly-120-apr-18th-2016-43028.md>)

Original publisher: [Read original article](<https://blog.llvm.org/2016/04/llvm-weekly-120-apr-18th-2016.html>)

Author: Alex Bradbury

Published: 2016-04-18T06:05:00Z

Content type: article

Language: en

Sources: [LLVM Project](<https://devfeed.tech/sources/the-llvm-project-blog.md>)

Topics: [LLVM](<https://devfeed.tech/topics/llvm.md>), [clang](<https://devfeed.tech/topics/clang.md>), [D](<https://devfeed.tech/topics/d.md>), [Rust](<https://devfeed.tech/topics/rust.md>), [mutation-testing](<https://devfeed.tech/topics/mutation-testing.md>), [inlining](<https://devfeed.tech/topics/inlining.md>)

Tags: [article](<https://devfeed.tech/tags/article.md>), [blog-post](<https://devfeed.tech/tags/blog-post.md>), [clang](<https://devfeed.tech/tags/clang.md>), [d](<https://devfeed.tech/tags/d.md>), [inlining](<https://devfeed.tech/tags/inlining.md>), [llvm](<https://devfeed.tech/tags/llvm.md>), [llvmweekly](<https://devfeed.tech/tags/llvmweekly.md>), [mutation-testing](<https://devfeed.tech/tags/mutation-testing.md>), [newsletter](<https://devfeed.tech/tags/newsletter.md>), [rust](<https://devfeed.tech/tags/rust.md>), [testing](<https://devfeed.tech/tags/testing.md>), [weekly](<https://devfeed.tech/tags/weekly.md>)

### AI overview

LLVM Weekly #120 is a newsletter covering developments in LLVM, Clang, and related projects. It highlights profile-guided optimization articles for D and Rust, a proposed LLVM-based mutation testing system, mailing-list discussions, and recent LLVM commits involving atomic lowering, inlining, debug information, ELF hashing, Swift calling conventions, and compile-time complexity.

### Source excerpt

Welcome to the one hundred and twentieth issue of LLVM Weekly, a weekly newsletter (published every Monday) covering developments in LLVM, Clang, and related projects. LLVM Weekly is brought to you by Alex Bradbury. Subscribe to future issues at http://llvmweekly.org and pass it on to anyone else you think may be interested. Please send any tips or feedback to asb@asbradbury.org, or @llvmweekly or @asbradbury on Twitter. The canonical home for this issue can be found here at llvmweekly.org. News and articles from around the web This week has seen not one, but two articles about LLVM and profile-guided optimisation. Dig in John Engelen's article about optimising D's virtual function calls with PGO, then read Geoffroy Couprie's article about PGO with Rust. The next Cambridge (UK) social will be at 7.30pm on April 20th, at the Cambridge Blue. Alex Denisov has written a blog post around the idea of building a mutation testing system using LLVM. On the mailing lists James Knight is requesting a way to test changes before committing them. Renato Golin had a thorough response. Eric Fiselier has shared an RFC on packaging the proposed libc++ filesystem library. Teresa Johnson has shared an RFC on the ThinLTO distributed backend interface. Jeroen Dobbelaere is wondering if there's any interest in an LLVM social in Leuven, Belgium. Mingwha Wang asks if there's any support for outlining in LLVM. You'll want to look at CodeExtractor. LLVM commits AtomicExpandPass learned to lower various atomic operations to __atomic_* library calls. The eventual aim is to move all atomic lowering from Clang to LLVM. r266115. Targets can now define an inlining threshold multiplier, to e.g. increase the likelihood of inlining on platforms where calls are very expensive. r266405. The ownership between DICompileUnit and DISubprogram has been reversed. This may break tests for your out-of-tree backend, but the commit has a link to a Python script to update your testcases. r266446. llvm-readobj lear

## LLVM Weekly - #83, Aug 3rd 2015

DevFeed: [LLVM Weekly - #83, Aug 3rd 2015](<https://devfeed.tech/articles/llvm-weekly-83-aug-3rd-2015-42987.md>)

Original publisher: [Read original article](<https://blog.llvm.org/2015/08/llvm-weekly-83-aug-3rd-2015.html>)

Author: Alex Bradbury

Published: 2015-08-03T06:21:00Z

Content type: news

Language: en

Sources: [LLVM Project](<https://devfeed.tech/sources/the-llvm-project-blog.md>)

Topics: [LLVM](<https://devfeed.tech/topics/llvm.md>), [clang](<https://devfeed.tech/topics/clang.md>), [CMake](<https://devfeed.tech/topics/cmake.md>), [integrity](<https://devfeed.tech/topics/integrity.md>), [Protection](<https://devfeed.tech/topics/protection.md>), [toolchain](<https://devfeed.tech/topics/toolchain.md>), [implementation](<https://devfeed.tech/topics/implementation.md>), [inlining](<https://devfeed.tech/topics/inlining.md>), [deprecated](<https://devfeed.tech/topics/deprecated.md>)

Tags: [clang](<https://devfeed.tech/tags/clang.md>), [cmake](<https://devfeed.tech/tags/cmake.md>), [deprecated](<https://devfeed.tech/tags/deprecated.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [inlining](<https://devfeed.tech/tags/inlining.md>), [integrity](<https://devfeed.tech/tags/integrity.md>), [llvm](<https://devfeed.tech/tags/llvm.md>), [llvmweekly](<https://devfeed.tech/tags/llvmweekly.md>), [protection](<https://devfeed.tech/tags/protection.md>), [testing](<https://devfeed.tech/tags/testing.md>), [toolchains](<https://devfeed.tech/tags/toolchains.md>), [windows](<https://devfeed.tech/tags/windows.md>)

### AI overview

LLVM Weekly issue 83 reports releases and proposals across LLVM and Clang, including CodeChecker, LLVM/Clang 3.7 RC2, Picon control-flow integrity, Windows and toolchain support changes, loop transformations, inlining cost analysis, CMake plans, and lazy JIT support in Orc.

### Source excerpt

Welcome to the eighty-third issue of LLVM Weekly, a weekly newsletter (published every Monday) covering developments in LLVM, Clang, and related projects. LLVM Weekly is brought to you by Alex Bradbury. Subscribe to future issues at http://llvmweekly.org and pass it on to anyone else you think may be interested. Please send any tips or feedback to asb@asbradbury.org, or @llvmweekly or @asbradbury on Twitter. The canonical home for this issue can be found here at llvmweekly.org. News and articles from around the web The CodeChecker static analysis infrastructure built on Clang Static Analyzer has been released. The slides from the talk at EuroLLVM earlier this year give a good overview. LLVM/Clang 3.7 RC2 has been tagged. Time to get testing. The implementation of the Picon Control Flow Integrity protection mechanism has been released. See also the associated paper Picon: Control Flow Integrity on LLVM IR. On the mailing lists There is a plan to jump to Windows 7 as the baseline requirement for LLVM, which has been featured in LLVM Weekly previously many months ago. If such a move would cause a problem for you, now is the time to speak up. There's also a proposal to drop support for the old mingw.org toolchains in favour of the maintained mingw-w64. James Molloy has prototyped LoopEditor, a high-level API for loop transformations in LLVM and is seeking additional feedback. The hope is that existing loop transformations could be rewritten and simplified to use it. Easwaran Raman has shared an RFC on speedup estimation for inlining cost analysis. The idea is that the estimated speedup (reduction in dynamic instruction count) from performing the inlining should be used as part of the cost metric. Chris Bieneman has penned a CMake in LLVM roadmap and July CMake update. There's even hope the autoconf build system might be marked deprecated before the 3.8 branch. Peter Collingbourne has shared a proposal for arbitrary relocations in constant global initialisers. Try not to

## Sorting improvements in PostgreSQL 9.2: the case for micro-optimisation

DevFeed: [Sorting improvements in PostgreSQL 9.2: the case for micro-optimisation](<https://devfeed.tech/articles/sorting-improvements-in-postgresql-9-2-the-case-for-micro-optimisation-33644.md>)

Original publisher: [Read original article](<https://pgeoghegan.blogspot.com/2012/08/sorting-improvements-in-postgresql-92.html>)

Author: Peter Geoghegan (noreply@blogger.com)

Published: 2012-08-02T02:04:00Z

Content type: article

Language: en

Sources: [Peter Geoghegan's blog](<https://devfeed.tech/sources/peter-geoghegan-s-blog.md>)

Topics: [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [Sorting](<https://devfeed.tech/topics/sorting.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [inlining](<https://devfeed.tech/topics/inlining.md>)

Tags: [c](<https://devfeed.tech/tags/c.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [cpu](<https://devfeed.tech/tags/cpu.md>), [inlining](<https://devfeed.tech/tags/inlining.md>), [performance](<https://devfeed.tech/tags/performance.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [sorting](<https://devfeed.tech/tags/sorting.md>)

### AI overview

This article explains the development of PostgreSQL 9.2 sorting improvements. The approach specialized quicksort code, used compiler inlining and generated specializations, and reduced indirection in comparator calls. The article states that simple in-memory integer and floating-point sorting became about 23% faster.

### Source excerpt

There has been much discussion of performance improvements in the upcoming 9.2 release of PostgreSQL. Recently, I noticed that Regina Obe and Leo Hsu's new book, "PostgreSQL: Up and running" prominently listed "Sorting improvements that improve in-memory sorting operations by as much as 20%" as a performance feature of that release. While they do get things about right there, I'm not sure that this improvement warrants such prominent placement, at least in sheer terms of its likely impact on the performance of production PostgreSQL systems - we packed a lot of great performance improvements into 9.2. The likely reason that it was picked up on in the book, and the real reason for this blogpost, is the story behind the development of the optimisation, which I for one find kind of interesting, and worth sharing. It's more interesting from the perspective of someone with a general interest in systems programming or PostgreSQL's design philosophy than a casual user, though. If you're a casual user, the short version is that simple queries that perform in-memory sorting of integers and floats will be about 23% faster. I wrote a rough prototype of the patch, that had a number of ideas, and proved the viability of the approach. Principal among those ideas was specialisation of the quicksort code: Formatting the code such that the compiler had compile-time knowledge of functions, with inlining used as an enabling optimisation, and a few variations produced. So rather than using complex indirection involving function pointers, a macro infrastructure was used to generate multiple specialisations, allowing the compiler to optimise the code more effectively as a result of being able to integrate everything. A secondary problem was that comparators (i.e. the comparison functions that all sorting within Postgres currently needs) were accessed in a round-about away. Roughly speaking, tuplesort (the part of the code that deals with sorting tuples, perhaps as part of a query's execut

## "Appearances can be deceiving Mr. Anderson" - a.k.a. short code is not always fast code

DevFeed: ["Appearances can be deceiving Mr. Anderson" - a.k.a. short code is not always fast code](<https://devfeed.tech/articles/appearances-can-be-deceiving-mr-anderson-a-k-a-short-code-is-not-always-fast-code-51931.md>)

Original publisher: [Read original article](<https://lea.verou.me/2009/02/appearances-can-be-deceiving-mr-anderson-aka-short-code-is-not-always-fast-code/>)

Author: Lea Verou

Published: 2009-02-25T00:00:00Z

Content type: article

Language: en

Sources: [Lea Verou's blog](<https://devfeed.tech/sources/lea-verou-s-blog.md>)

Topics: [inlining](<https://devfeed.tech/topics/inlining.md>)

Tags: [arrays](<https://devfeed.tech/tags/arrays.md>), [articles](<https://devfeed.tech/tags/articles.md>), [benchmarks](<https://devfeed.tech/tags/benchmarks.md>), [blog](<https://devfeed.tech/tags/blog.md>), [code](<https://devfeed.tech/tags/code.md>), [fast](<https://devfeed.tech/tags/fast.md>), [faster](<https://devfeed.tech/tags/faster.md>), [jquery](<https://devfeed.tech/tags/jquery.md>), [js](<https://devfeed.tech/tags/js.md>), [matrix](<https://devfeed.tech/tags/matrix.md>), [number](<https://devfeed.tech/tags/number.md>), [object](<https://devfeed.tech/tags/object.md>), [performance](<https://devfeed.tech/tags/performance.md>), [prototype](<https://devfeed.tech/tags/prototype.md>), [quote](<https://devfeed.tech/tags/quote.md>), [string](<https://devfeed.tech/tags/string.md>), [strings](<https://devfeed.tech/tags/strings.md>), [test](<https://devfeed.tech/tags/test.md>), [tests](<https://devfeed.tech/tags/tests.md>), [type](<https://devfeed.tech/tags/type.md>), [type-checking](<https://devfeed.tech/tags/type-checking.md>), [type-checks](<https://devfeed.tech/tags/type-checks.md>)

### AI overview

The article finds that short coercion-based String and Number checks were slower in its tests: Object.prototype.toString.call was reported 50% faster, while typeof and constructor checks were 150% faster. The author attributes the gap to the extra conversion, concatenation or addition, and comparison performed by the short checks, while noting that all test times were negligible. For non-primitive String and Number objects, typeof and the coercion check fail; adding instanceof handles those cases with a negligible speed decrease, but instanceof alone misses primitives. Both instanceof and constructor checks can fail for values created in another window. The author therefore recommends Object.prototype.toString.call as the most reliable of the compared methods, while urging readers to test performance rather than infer it from code length.

### Source excerpt

I used to take pride in my short, bulletproof and elegant String and Number type checks: // Check whether obj is a Number obj + 0 === obj // Check whether obj is a String obj + '' === obj I always thought that apart from being short and elegant, they should be faster. However, some quick tests gave me a cold slap in the face and proved my assertion to be entirely false. When comparing the following 4 methods for string and number type checking: "My" method (mentioned above) Object.prototype.toString method: Object.prototype.toString.call(obj) === '[object String]' or Object.prototype.toString.call(obj) === '[object Number]' Typeof method: typeof obj === 'string' or typeof obj === 'number' Contructor method: obj.constructor === String or obj.constructor === Number It turned out that the Object.prototype.toString method was 50% faster than my method, and both typeof and constructor methods were a whopping 150% faster than my method! No wonder jQuery uses the typeof method for their String/Number tests. Now that I think about it, it does actually make sense - my method converts obj to a String or Number, then concatenates/adds it with another String/Number, then compares value and type. Too much stuff done there to be fast. But I guess I was too innocent and subconsciously thought that it wouldn't be fair if elegant and short code wasn't fast too. Of course the overall time needed for any of these tests was neglible, but it's a good example of how much appearances can be deceiving - even in programming! ;) The moral: Never assume. Always test. So, which method is ideal for String/Number checks? (added afterwards) The typeof method and my method fail for non-primitive String/Number objects, as you can easily observe if you type in the console: typeof new String('foo') // 'object' typeof new Number(5) // 'object' new String('foo') + '' === new String('foo') // false This can easily be solved if you also check the type via instanceof (the decrease in speed is negligible):