Upgrade to Pro — share decks privately, control downloads, hide ads and more …

🇨🇭 Voxxed Days CERN 2026

🇨🇭 Voxxed Days CERN 2026

Compilers, User Interfaces & the Rest of Us

Compilers have long been considered among the most complex topics in computer science. Today, web frameworks are evolving from runtime libraries into optimizing compilers, reshaping how we build user interfaces. Different topics in front-end development—e.g., reactive programming—are now experiencing this era, fueled by static-analysis-driven insights.

This talk will explore how modern UI compilers are redefining performance and developer experience. We’ll discuss how some compilers are designed, as well as different open-source solutions—including the React Compiler, Million.js, Svelte, and Marko—enterprise apps, and the growing role of compilers in automating tasks.

By the end of the session, you'll likely be optimistic about a future where compilers understand our entire code and offload a significant portion of our mental burden related to manual tasks.

Avatar for Matheus Albuquerque

Matheus Albuquerque PRO

February 06, 2026
Tweet

More Decks by Matheus Albuquerque

Other Decks in Programming

Transcript

  1. COMPILERS, USER INTERFACES & THE REST OF US • FEBRUARY

    10, 2026. Bonjour, Genève! 👋 🇨🇭
  2. Matheus Albuquerque ↝ 👨💻 STAFF SWE @ MEDALLIA ↝ ⚛

    CHAIR @ REACT SUMMIT NYC ↝ ⚡ GOOGLE DEVELOPER EXPERT ↝ 𝕏 YTHECOMBINATOR
  3. “So here’s my advice for anyone who wants to make

    a dent in the future of web development: time to learn how compilers work.” Compilers are the New Frameworks • Tom Dale, 2017
  4. “Reactive systems have existed even in this space for years.

    In fact, reactivity was seen as a bad thing for a while with the rise of the popularity of React. The thing that has made reactive programming interesting again are compilers.” Marko: Compiling Fine-Grained Reactivity • Ryan Carniato, 2022
  5. “Static analysis and compilation let us take what we know

    of your code's structure and optimize the creation paths as we already know what you are trying to create.” Marko: Compiling Fine-Grained Reactivity • Ryan Carniato, 2022
  6. ↝ LINTERS: ESLint (2013), TSLint (2015), Biome (2023), Oxlint (2023)…

    ↝ FORMATTERS: Prettier (2017), dprint (2020), Biome (2023)… ↝ BUNDLERS: Webpack (2012), Rollup (2015), Vite (2020), esbuild (2020), Rspack (2022), Rolldown (2023)… COMPILERS & STATIC ANALYSIS…
  7. ↝ TRANSPILERS: Babel (2014), SWC (2020)… ↝ TYPE CHECKERS: TypeScript

    (2012), Flow (2014)… ↝ MINIFIERS: UglifyJS (2010), Terser (2018)… ↝ CSS PROCESSING: PostCSS (2013), CSSO (2015), cssnano (2015), LightningCSS (2022)… COMPILERS & STATIC ANALYSIS…
  8. MY GOALS FOR TODAY… Bridge the gap between foundational computer

    science concepts and practical front-end development. Open your mind to—or even empower you with—tools to tackle a variety of complex challenges.
  9. What do you work with? e.g. React, Vue.js, Angular, Preact,

    Svelte, Alpine.js, Lit, Solid, Qwik, Stencil, HTMX… COMPILERS, USER INTERFACES & THE REST OF US
  10. #definition 🧐 jscodeshift is a tool that runs a transformation

    script over one or more JavaScript or TypeScript fi les.
  11. JSCODESHIFT: HELLO WORLD export default function transformer(file: FileInfo, api: API)

    { const j = api.jscodeshift; const root = j(file.source); const variableDeclarators = root.findVariableDeclarators('foo'); variableDeclarators.renameTo('bar'); return root.toSource(); }
  12. JSCODESHIFT: HELLO WORLD export default function transformer(file: FileInfo, api: API)

    { const j = api.jscodeshift; const root = j(file.source); const variableDeclarators = root.findVariableDeclarators('foo'); variableDeclarators.renameTo('bar'); return root.toSource(); }
  13. JSCODESHIFT: HELLO WORLD export default function transformer(file: FileInfo, api: API)

    { const j = api.jscodeshift; const root = j(file.source); const variableDeclarators = root.findVariableDeclarators('foo'); variableDeclarators.renameTo('bar'); return root.toSource(); }
  14. STATIC ANALYSIS ENABLED… GRADUAL ROLLOUT OF TWO ENTIRELY DIFFERENT, FEATURE

    -FLAG-PROTECTED, BUILDS OF THE SAME CODEBASE, WITH: ↝ DIFFERENT VERSIONS OF DEPENDENCIES. ↝ DIFFERENT STRATEGIES USED FOR BUNDLING.
  15. UNDERSTANDING MILLIONS OF LOC REACT: INTERNALS AND ADVANCED PERFORMANCE PATTERNS/

    COMPILERS, USER INTERFACES & THE REST OF US 2025 2024
  16. HYRUM'S LAW & ME — BASICS OF THE G2 +

    MEDALLIA INTEGRATION • G2 DOCUMENTATION
  17. STATIC ANALYSIS ENABLED… ↝ METRICS AROUND USER-GENERATED CONTENT BASED ON

    PLUGIN COMPOSITION. ↝ ACTUAL DATA IS THE SINGLE SOURCE OF TRUTH AND CONSISTENCY IS GUARANTEED ACROSS ALL API ENDPOINTS AND THE REACT APP. ↝ RAPID ITERATION WITH INSTANT TYPED APIS AND ENHANCED DX WHEN IMPLEMENTING NEW METRICS.
  18. TS-MORPH: HELLO WORLD AFTER BEFORE interface ApiResponse { userData?: UserData;

    apiVersion?: string; isActive?: boolean; userPreferences?: UserPreferences; } interface Welcome { the_user_data?: UserData; "api-version"?: string; isActive?: boolean; user_preferences?: any; }
  19. TS-MORPH: HELLO WORLD sourceFile.getInterfaces().forEach(iface = > { / / Convert

    snake_case to camelCase const newName = toCamelCase(iface.getName()); iface.rename(newName); / / Transform properties iface.getProperties().forEach(prop = > { const propName = prop.getName(); if (propName.includes('_') | | propName.includes('-')) { const camelName = toCamelCase(propName.replace(/["-]/g, '_')); prop.rename(camelName); } / / Replace 'any' types with proper interfaces if (prop.getTypeNode()?.getText() === 'any') { prop.setType('UserPreferences'); } }); });
  20. sourceFile.getInterfaces().forEach(iface = > { / / Convert snake_case to camelCase

    const newName = toCamelCase(iface.getName()); iface.rename(newName); / / Transform properties iface.getProperties().forEach(prop = > { const propName = prop.getName(); if (propName.includes('_') | | propName.includes('-')) { const camelName = toCamelCase(propName.replace(/["-]/g, '_')); prop.rename(camelName); } / / Replace 'any' types with proper interfaces if (prop.getTypeNode()?.getText() === 'any') { prop.setType('UserPreferences'); } TS-MORPH: HELLO WORLD
  21. MILLION LINT: COMPILER function App({ start }) { const [count,

    setCount] = useState(start); useEffect(() = > { console.log("double: ", count * 2); }, [count]); return <Button onClick={() = > setCount(count + 1)}>{count}</Button>; } — MILLION LINT IS IN PUBLIC BETA • 2024
  22. MILLION LINT: COMPILER function App({ start }) { Million.capture({ start

    }); const [count, setCount] = Million.capture(useState)(start); useEffect( () = > { console.log("double: ", count * 2); }, Million.capture([count]), ); return Million.capture( <Button onClick={() = > setCount(count + 1)}>{count}</Button>, ); } — MILLION LINT IS IN PUBLIC BETA • 2024
  23. MILLION LINT: COMPILER [ 'src/App.jsx': { components: { App: {

    renders: [{ count: 7, time: 0.1 }, . . . ], instances: 3, count: 70, time: 1, location: [13, 0, 23, 1], } } } ]; [ { kind: 'state', count: 7, time: 0.1, changes: [{ prev: 0, next: 8 }, . . . ], } ]; — MILLION LINT IS IN PUBLIC BETA • 2024
  24. ↝ IMPROVE THE RENDERING PERFORMANCE BY AUTOMATICALLY GENERATING THE EQUIVALENT

    OF useMemo, useCallback, AND memo CALLS. ↝ MINIMIZE THE COST OF RE-RENDERING WHILE RETAINING REACT’S PROGRAMMING MODEL. ↝ AUTOMATIC OPTIMIZATION COMPILER. REACT COMPILER: OVERVIEW
  25. ↝ IT'S A CLASS OF TECHNIQUES THAT ATTEMPT TO DETERMINE

    IF VARIABLES REFER TO THE SAME UNDERLYING DATA. ↝ IT HELPS COMPILERS GENERATE EFFICIENT AND OPTIMIZED CODE. ALIAS ANALYSIS: OVERVIEW
  26. function example(arr) { arr[0] = 10; const value = arr[0];

    return value; } ALIAS ANALYSIS DOES `VALUE` ALWAYS EQUAL 10?
  27. ALIAS ANALYSIS: EX. #1 function Component({ a, b }) {

    const x = []; x.push(a); return <Foo x={x} />; } function Component({ a, b }) { > } — ALIAS ANALYSIS IN THE REACT COMPILER • SATHYA GUNASEKARAN, 2024
  28. ALIAS ANALYSIS: EX. #1 function Component({ a, b }) {

    } function Component({ a, b }) { const x = useMemo(() = > { const x = []; x.push(a); return x; }, [a]); return <Foo x={x} />; } — ALIAS ANALYSIS IN THE REACT COMPILER • SATHYA GUNASEKARAN, 2024
  29. ALIAS ANALYSIS: EX. #1 function Component({ a, b }) {

    } function Component({ a, b }) { > } ✅ — ALIAS ANALYSIS IN THE REACT COMPILER • SATHYA GUNASEKARAN, 2024
  30. ALIAS ANALYSIS: EX. #2 function Component({ a, b }) {

    const x = []; x.push(a); const y = x; y.push(b); return <Foo x={x} />; } function Component({ a, b }) { > > } — ALIAS ANALYSIS IN THE REACT COMPILER • SATHYA GUNASEKARAN, 2024
  31. ALIAS ANALYSIS: EX. #2 function Component({ a, b }) {

    } function Component({ a, b }) { const x = useMemo(() = > { const x = []; x.push(a); return x; }, [a]); const y = useMemo(() = > { const y = x; y.push(b); return y; }, [x, b]); return <Foo x={x} />; } — ALIAS ANALYSIS IN THE REACT COMPILER • SATHYA GUNASEKARAN, 2024
  32. ALIAS ANALYSIS: EX. #2 function Component({ a, b }) {

    const x = []; x.push(a); const y = x; y.push(b); return <Foo x={x} />; } function Component({ a, b }) { > > } ❌ — ALIAS ANALYSIS IN THE REACT COMPILER • SATHYA GUNASEKARAN, 2024
  33. ALIAS ANALYSIS: EX. #2 function Component({ a, b }) {

    } function Component({ a, b }) { const x = useMemo(() = > { const x = []; x.push(a); const y = x; y.push(b); return y; }, [a, b]); return <Foo x={x} />; } — ALIAS ANALYSIS IN THE REACT COMPILER • SATHYA GUNASEKARAN, 2024
  34. ALIAS ANALYSIS: EX. #2 function Component({ a, b }) {

    } function Component({ a, b }) { const x = useMemo(() => { const x = []; x.push(a); const y = x; y.push(b); return y; }, [a, b]); return <Foo x={x} />; } ✅ — ALIAS ANALYSIS IN THE REACT COMPILER • SATHYA GUNASEKARAN, 2024
  35. ↝ A TECHNIQUE WHERE EVERY VARIABLE HAS A SINGLE DEFINITION.

    MAINTAINING USE-DEFINED CHAINS IS EASIER, SINCE FOR EVERY USE, YOU HAVE TO KEEP TRACK OF ONLY ONE DEFINITION. ↝ THE SIMPLIFIED STRUCTURE ENABLES MORE POWERFUL AND EFFICIENT OPTIMIZATION TECHNIQUES. SSA FORM: OVERVIEW
  36. SSA FORM: OVERVIEW x = y - z s =

    x + s x = s + p s = z * q s = x * s x = y - z s2 = x + s x2 = s2 + p s3 = z * q s4 = x2 * s3 AFTER BEFORE
  37. SSA FORM: OVERVIEW x = y - z s =

    x + s x = s + p s = z * q s = x * s x = y - z s2 = x + s x2 = s2 + p s3 = z * q s4 = x2 * s3 AFTER BEFORE
  38. SSA FORM: EXAMPLE function Component({ colors }) { let styles

    = { colors }; return <Item styles={styles} />; } function Component(props) { const $ = useMemoCache(2); const { colors } = props; let t0; if ($[0] ! = = colors) { t0 = { colors }; $[0] = colors; $[1] = t0; } else { t0 = $[1]; } const styles = t0; return <Item styles={styles} />; } — COMPILER THEORY AND REACTIVITY • SATHYA GUNASEKARAN, 2024
  39. SVELTE COMPILERS, USER INTERFACES & THE REST OF US 2016

    ⚡ PERFORMANCE ⚙ CODE EXTRACTION
  40. SVELTE ↝ TRACKS VARIABLES AND DETERMINES THEIR SCOPES. ↝ IDENTIFIES

    DEPENDENCIES AND DETECTS REACTIVE STATEMENTS AND EVENT HANDLERS. ↝ SCOPES STYLES TO COMPONENTS AND OPTIMIZES CSS FOR PERFORMANCE. …AND MUCH MORE!
  41. SVELTE: $$invalidate ↝ EVERY VARIABLE THAT HAS BEEN REASSIGNED OR

    MUTATED AND REFERENCED IN THE TEMPLATE WILL HAVE THE $$invalidate FUNCTION INSERTED RIGHT AFTER THE ASSIGNMENT OR MUTATION. ↝ IT MARKS THE VARIABLE DIRTY AND SCHEDULES AN UPDATE FOR THE COMPONENT.
  42. JAXER: CODE EXTRACTION < ! - - Database, file, and

    socket access from JavaScript - - > <script runat="server"> var resultSet = Jaxer.DB.execute("SELECT * FROM myTable"); var newPrice = resultSet.rows[0].price; </script> < ! - - Directly call server-side functions from the browser - - > <script runat="server-proxy"> function getPriceFromServer() { return 42; } </script> <button onclick="alert(getPriceFromServer())">Price</button> < ! - - Share validation code on the browser and server - - > <script runat="both"> function validateCreditCard(number) {} </script>
  43. JAXER: CODE EXTRACTION < ! - - Database, file, and

    socket access from JavaScript - - > <script runat="server"> var resultSet = Jaxer.DB.execute("SELECT * FROM myTable"); var newPrice = resultSet.rows[0].price; </script> < ! - - Directly call server-side functions from the browser - - > <script runat="server-proxy"> function getPriceFromServer() { return 42; } </script> <button onclick="alert(getPriceFromServer())">Price</button> < ! - - Share validation code on the browser and server - - > <script runat="both"> function validateCreditCard(number) {} </script>
  44. V8 & COMPILERS… TWO EXAMPLES: ↝ MAGLEV: GETS TYPE FEEDBACK

    FROM THE INTERPRETER AND RUNS QUICK OPTIMIZATIONS. ↝ TURBOFAN: TRANSLATES BYTE-CODE INTO HIGHLY OPTIMIZED MACHINE CODE, USING SEA OF NODES (SON) AND CONTROL-FLOW GRAPH (CFG) IR.
  45. JAVASCRIPTCORE & COMPILERS… TWO EXAMPLES: ↝ DFG JIT: BUILDS A

    DATA-FLOW GRAPH IR, USES PROFILING TO SPECIALIZE TYPES, REMOVE CHECKS, AND MORE, BUT WITH MODERATE COMPILE COST. ↝ FTL JIT: USES MULTIPLE IR (INCLUDING B3 AND LLVM) FOR AGGRESSIVE OPTIMIZATIONS AND HIGHER THROUGHPUT FOR HOT CODE.
  46. #1 of 2 Compilers are no longer just for systems

    programming. COMPILERS, USER INTERFACES & THE REST OF US
  47. #2 of 2 Understanding compilers can make you a better

    JavaScript developer. COMPILERS, USER INTERFACES & THE REST OF US
  48. COMPILERS, USER INTERFACES & THE REST OF US THAT’S ALL,

    FOLKS! MERCI! 👋 🇨🇭 QUESTIONS? MATHEUS ALBUQUERQUE • @ythecombinator