This commit is contained in:
nlohmann committed 2026-11-09 18:59:22 +00:00
1 parent cf8df97ba7
commit eeea067a72
566 files changed
+15370 -2688

No files matched your search

+2 -2
View File
@@ -1,4 +1,4 @@
<!doctype html><html lang=en class=no-js> <head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content="JSON for Modern C++ is a header-only C++11 library that makes JSON a first-class data type."><meta name=author content="Niels Lohmann"><link href="https://json.nlohmann.me/integration/compile_times/" rel="canonical"><link href=../pkg-config/ rel=prev><link href=../../api/basic_json/ rel=next><link rel=icon href=../../assets/images/favicon.png><meta name=generator content="mkdocs-1.6.1, mkdocs-material-9.8.0"><title>Compile times - JSON for Modern C++</title><link rel=stylesheet href=../../assets/stylesheets/main.57a0d79d.min.css><link rel=stylesheet href=../../assets/stylesheets/palette.fb2fffe2.min.css><link rel=stylesheet href=../../css/custom.css><link rel=stylesheet href=../../css/brand.css><link rel=stylesheet href=../../css/fig-sax.css><link rel=stylesheet href=../../css/fig-jsonview.css><link rel=stylesheet href=../../css/fig-exceptions.css><link rel=stylesheet href=../../css/fig-pointer.css><link rel=stylesheet href=../../css/fig-charts.css><link rel=stylesheet href=../../css/fig-integration.css><link rel=stylesheet href=../../css/fig-macros.css><script>__md_scope=new URL("../..",location),__md_hash=e=>[...e].reduce(((e,_)=>(e<<5)-e+_.charCodeAt(0)),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script></head> <body dir=ltr data-md-color-scheme=default data-md-color-primary=custom data-md-color-accent=custom> <input class=md-toggle data-md-toggle=drawer type=checkbox id=__drawer autocomplete=off> <input class=md-toggle data-md-toggle=search type=checkbox id=__search autocomplete=off> <label class=md-overlay for=__drawer></label> <div data-md-component=skip> <a href=#compile-times class=md-skip> Skip to content </a> </div> <div data-md-component=announce> </div> <header class=md-header data-md-component=header> <nav class="md-header__inner md-grid" aria-label=Header> <a href=../.. title="JSON for Modern C++" class="md-header__button md-logo" aria-label="JSON for Modern C++" data-md-component=logo> <img src=../../images/wordmark-header.svg alt=logo> </a> <label class="md-header__button md-icon" for=__drawer> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z"/></svg> </label> <div class=md-header__title data-md-component=header-title> <div class=md-header__ellipsis> <div class=md-header__topic> <span class=md-ellipsis> JSON for Modern C++ </span> </div> <div class=md-header__topic data-md-component=header-topic> <span class=md-ellipsis> Compile times </span> </div> </div> </div> <form class=md-header__option data-md-component=palette> <input class=md-option data-md-color-media="(prefers-color-scheme: light)" data-md-color-scheme=default data-md-color-primary=custom data-md-color-accent=custom aria-label="Switch to dark mode" type=radio name=__palette id=__palette_0> <label class="md-header__button md-icon" title="Switch to dark mode" for=__palette_1 hidden> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M12 8a4 4 0 0 0-4 4 4 4 0 0 0 4 4 4 4 0 0 0 4-4 4 4 0 0 0-4-4m0 10a6 6 0 0 1-6-6 6 6 0 0 1 6-6 6 6 0 0 1 6 6 6 6 0 0 1-6 6m8-9.31V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12z"/></svg> </label> <input class=md-option data-md-color-media="(prefers-color-scheme: dark)" data-md-color-scheme=slate data-md-color-primary=custom data-md-color-accent=custom aria-label="Switch to light mode" type=radio name=__palette id=__palette_1> <label class="md-header__button md-icon" title="Switch to light mode" for=__palette_0 hidden> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M12 18c-.89 0-1.74-.2-2.5-.55C11.56 16.5 13 14.42 13 12s-1.44-4.5-3.5-5.45C10.26 6.2 11.11 6 12 6a6 6 0 0 1 6 6 6 6 0 0 1-6 6m8-9.31V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12z"/></svg> </label> </form> <script>var palette=__md_get("__palette");if(palette&&palette.color){if("(prefers-color-scheme)"===palette.color.media){var media=matchMedia("(prefers-color-scheme: light)"),input=document.querySelector(media.matches?"[data-md-color-media='(prefers-color-scheme: light)']":"[data-md-color-media='(prefers-color-scheme: dark)']");palette.color.media=input.getAttribute("data-md-color-media"),palette.color.scheme=input.getAttribute("data-md-color-scheme"),palette.color.primary=input.getAttribute("data-md-color-primary"),palette.color.accent=input.getAttribute("data-md-color-accent")}for(var[key,value]of Object.entries(palette.color))document.body.setAttribute("data-md-color-"+key,value)}</script> <label class="md-header__button md-icon" for=__search> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.Line truncated
<!doctype html><html lang=en class=no-js> <head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content="JSON for Modern C++ is a header-only C++11 library that makes JSON a first-class data type."><meta name=author content="Niels Lohmann"><link href="https://json.nlohmann.me/integration/compile_times/" rel="canonical"><link href=../pkg-config/ rel=prev><link href=../../api/basic_json/ rel=next><link rel=icon href=../../assets/images/favicon.png><meta name=generator content="mkdocs-1.6.1, mkdocs-material-9.8.0"><title>Compile times - JSON for Modern C++</title><link rel=stylesheet href=../../assets/stylesheets/main.57a0d79d.min.css><link rel=stylesheet href=../../assets/stylesheets/palette.fb2fffe2.min.css><link rel=stylesheet href=../../css/custom.css><link rel=stylesheet href=../../css/brand.css><link rel=stylesheet href=../../css/fig-sax.css><link rel=stylesheet href=../../css/fig-jsonview.css><link rel=stylesheet href=../../css/fig-exceptions.css><link rel=stylesheet href=../../css/fig-pointer.css><link rel=stylesheet href=../../css/fig-charts.css><link rel=stylesheet href=../../css/fig-integration.css><link rel=stylesheet href=../../css/fig-macros.css><script>__md_scope=new URL("../..",location),__md_hash=e=>[...e].reduce(((e,_)=>(e<<5)-e+_.charCodeAt(0)),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script></head> <body dir=ltr data-md-color-scheme=default data-md-color-primary=custom data-md-color-accent=custom> <input class=md-toggle data-md-toggle=drawer type=checkbox id=__drawer autocomplete=off> <input class=md-toggle data-md-toggle=search type=checkbox id=__search autocomplete=off> <label class=md-overlay for=__drawer></label> <div data-md-component=skip> <a href=#compile-times class=md-skip> Skip to content </a> </div> <div data-md-component=announce> </div> <header class=md-header data-md-component=header> <nav class="md-header__inner md-grid" aria-label=Header> <a href=../.. title="JSON for Modern C++" class="md-header__button md-logo" aria-label="JSON for Modern C++" data-md-component=logo> <img src=../../images/wordmark-header.svg alt=logo> </a> <label class="md-header__button md-icon" for=__drawer> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z"/></svg> </label> <div class=md-header__title data-md-component=header-title> <div class=md-header__ellipsis> <div class=md-header__topic> <span class=md-ellipsis> JSON for Modern C++ </span> </div> <div class=md-header__topic data-md-component=header-topic> <span class=md-ellipsis> Compile times </span> </div> </div> </div> <form class=md-header__option data-md-component=palette> <input class=md-option data-md-color-media="(prefers-color-scheme: light)" data-md-color-scheme=default data-md-color-primary=custom data-md-color-accent=custom aria-label="Switch to dark mode" type=radio name=__palette id=__palette_0> <label class="md-header__button md-icon" title="Switch to dark mode" for=__palette_1 hidden> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M12 8a4 4 0 0 0-4 4 4 4 0 0 0 4 4 4 4 0 0 0 4-4 4 4 0 0 0-4-4m0 10a6 6 0 0 1-6-6 6 6 0 0 1 6-6 6 6 0 0 1 6 6 6 6 0 0 1-6 6m8-9.31V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12z"/></svg> </label> <input class=md-option data-md-color-media="(prefers-color-scheme: dark)" data-md-color-scheme=slate data-md-color-primary=custom data-md-color-accent=custom aria-label="Switch to light mode" type=radio name=__palette id=__palette_1> <label class="md-header__button md-icon" title="Switch to light mode" for=__palette_0 hidden> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M12 18c-.89 0-1.74-.2-2.5-.55C11.56 16.5 13 14.42 13 12s-1.44-4.5-3.5-5.45C10.26 6.2 11.11 6 12 6a6 6 0 0 1 6 6 6 6 0 0 1-6 6m8-9.31V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12z"/></svg> </label> </form> <script>var palette=__md_get("__palette");if(palette&&palette.color){if("(prefers-color-scheme)"===palette.color.media){var media=matchMedia("(prefers-color-scheme: light)"),input=document.querySelector(media.matches?"[data-md-color-media='(prefers-color-scheme: light)']":"[data-md-color-media='(prefers-color-scheme: dark)']");palette.color.media=input.getAttribute("data-md-color-media"),palette.color.scheme=input.getAttribute("data-md-color-scheme"),palette.color.primary=input.getAttribute("data-md-color-primary"),palette.color.accent=input.getAttribute("data-md-color-accent")}for(var[key,value]of Object.entries(palette.color))document.body.setAttribute("data-md-color-"+key,value)}</script> <label class="md-header__button md-icon" for=__search> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.Line truncated
<span class=p>{</span>
<span class=w> </span><span class=n>std</span><span class=o>::</span><span class=n>string</span><span class=w> </span><span class=n>name</span><span class=p>;</span>
<span class=w> </span><span class=kt>int</span><span class=w> </span><span class=n>age</span><span class=w> </span><span class=o>=</span><span class=w> </span><span class=mi>0</span><span class=p>;</span>
@@ -66,7 +66,7 @@ g++-16<span class=w> </span>--sysroot<span class=o>=</span><span class=k>$(</spa
<span class=w> </span>-o<span class=w> </span>json_mod.o
g++-16<span class=w> </span>--sysroot<span class=o>=</span><span class=k>$(</span>xcrun<span class=w> </span>--show-sdk-path<span class=k>)</span><span class=w> </span>-std<span class=o>=</span>c++20<span class=w> </span>-fmodules<span class=w> </span>-O0<span class=w> </span>-c<span class=w> </span>model.cpp
</code></pre></div> <p>Link <code>json_mod.o</code> into the program.</p> </details> <h2 id=use-precompiled-headers>Use precompiled headers<a class=headerlink href=#use-precompiled-headers title="Permanent link">&para;</a></h2> <p>Build systems can precompile <code>&lt;nlohmann/json.hpp&gt;</code> together with other stable headers, for example with CMake's <a href="https://cmake.org/cmake/help/latest/command/target_precompile_headers.html"><code>target_precompile_headers</code></a>:</p> <div class=highlight><pre><span></span><code><span class=nb>target_precompile_headers</span><span class=p>(</span><span class=s>my_target</span><span class=w> </span><span class=s>PRIVATE</span><span class=w> </span><span class=s>&lt;nlohmann/json.hpp&gt;</span><span class=p>)</span>
</code></pre></div> <p>This removes the cost of parsing the header, but not of instantiating templates in each translation unit, so it combines well with the options above.</p> <div class=nj-fig-wrap> <p><svg class="nj-fig nj-charts nj-charts--compile" viewbox="0 0 440 282" role=img aria-labelledby="nj-charts-pch nj-charts-pch-d" xmlns=http://www.w3.org/2000/svg> <title id=nj-charts-pch>Compile time per translation unit with a precompiled json.hpp at -O0, and the one-off cost of the PCH</title> <desc id=nj-charts-pch-d>Horizontal bars, negative is faster, medians of nine runs, -std=c++17. model TU, Apple clang: -43 % (1045 ms to 594 ms); model TU, G&#8203;CC 16: -41 % (1789 ms to 1060 ms); parsing TU, Apple clang: -38 % (1148 ms to 714 ms); parsing TU, G&#8203;CC 16: -25 % (2498 ms to 1884 ms); one-off build, Apple clang: 771 ms; one-off build, G&#8203;CC 16: 2254 ms.</desc> <rect class=nj-charts-clang x=8 y=10 width=12 height=12 rx=3 /> <text class=nj-charts-leg x=26 y=20.5>Apple clang</text> <rect class=nj-charts-gcc x=126 y=10 width=12 height=12 rx=3 /> <text class=nj-charts-leg x=144 y=20.5>G&#8203;CC 16</text> <line class=nj-charts-grid x1=68.6667 y1=58 x2=68.6667 y2=160 /> <text class=nj-charts-tick x=68.6667 y=176>&#8722;50 %</text> <line class=nj-charts-grid x1=220.333 y1=58 x2=220.333 y2=160 /> <text class=nj-charts-tick x=220.333 y=176>&#8722;25 %</text> <text class=nj-charts-tick x=372 y=176>0 %</text> <text class="nj-charts-tick nj-charts-tick--l" x=8 y=194>&#8592; faster per TU</text> <text class=nj-charts-rowlabel x=8 y=62>model TU<tspan class=nj-charts-sub> &#183; with PCH</tspan></text> <path class=nj-charts-clang d="M372 70 H115.133 Q111.133 70 111.133 74 V78 Q111.133 82 115.133 82 H372 Z"><title>model TU, Apple clang: 1045 ms by default, 594 ms with PCH (&#8722;43 %)</title></path> <text class=nj-charts-val x=377 y=80.5>&#8722;43 %</text> <path class=nj-charts-gcc d="M372 84 H127.267 Q123.267 84 123.267 88 V92 Q123.267 96 127.267 96 H372 Z"><title>model TU, G&#8203;CC 16: 1789 ms by default, 1060 ms with PCH (&#8722;41 %)</title></path> <text class=nj-charts-val x=377 y=94.5>&#8722;41 %</text> <text class=nj-charts-rowlabel x=8 y=114>parsing TU<tspan class=nj-charts-sub> &#183; with PCH</tspan></text> <path class=nj-charts-clang d="M372 122 H145.467 Q141.467 122 141.467 126 V130 Q141.467 134 145.467 134 H372 Z"><title>parsing TU, Apple clang: 1148 ms by default, 714 ms with PCH (&#8722;38 %)</title></path> <text class=nj-charts-val x=377 y=132.5>&#8722;38 %</text> <path class=nj-charts-gcc d="M372 136 H224.333 Q220.333 136 220.333 140 V144 Q220.333 148 224.333 148 H372 Z"><title>parsing TU, G&#8203;CC 16: 2498 ms by default, 1884 ms with PCH (&#8722;25 %)</title></path> <text class=nj-charts-val x=377 y=146.5>&#8722;25 %</text> <line class=nj-charts-zero x1=372 y1=58 x2=372 y2=160 /> <text class=nj-charts-rowlabel x=8 y=222>One-off cost<tspan class=nj-charts-sub> &#183; built once, reused by every TU</tspan></text> <rect class=nj-charts-clang x=8 y=232.5 width=10 height=10 rx=2.5 /> <text class=nj-charts-val x=24 y=242>Apple clang: 771 ms once, saves 434 to 451 ms per TU</text> <rect class=nj-charts-gcc x=8 y=252.5 width=10 height=10 rx=2.5 /> <text class=nj-charts-val x=24 y=262>G&#8203;CC 16: 2254 ms once, saves 614 to 729 ms per TU</text> </svg></p> </div> <p class=nj-caption>Change in compile time per translation unit at <code>-O0</code> with a precompiled <code>&lt;nlohmann/json.hpp&gt;</code> (<code>-std=c++17</code>), and the one-off cost of building the precompiled header, taken from the table below.</p> <table> <thead> <tr> <th>Compiler</th> <th>Translation unit</th> <th style="text-align: right;">Default (<code>-O0</code> / <code>-O2</code>)</th> <th style="text-align: right;">With PCH (<code>-O0</code> / <code>-O2</code>)</th> <th style="text-align: right;">Change</th> </tr> </thead> <tbody> <tr> <td>Apple clang</td> <td>model</td> <td style="text-align: right;">1045 ms / 1295 ms</td> <td style="text-align: right;">594 ms / 842 ms</td> <td style="text-align: right;">−43% / −35%</td> </tr> <tr> <td><abbr title="GNU Compiler Collection">GCC</abbr> 16</td> <td>model</td> <td style="text-align: right;">1789 ms / 2101 ms</td> <td style="text-align: right;">1060 ms / 1376 ms</td> <td style="text-align: right;">−41% / −35%</td> </tr> <tr> <td>Apple clang</td> <td>parsing</td> <td style="text-align: right;">1148 ms / 2008 ms</td> <td style="text-align: right;">714 ms / 1584 ms</td> <td style="text-align: right;">−38% / −21%</td> </tr> <tr> <td><abbr title="GNU Compiler Collection">GCC</abbr> 16</td> <td>parsing</td> <td style="text-align: right;">2498 ms / 4075 ms</td> <td style="text-align: right;">1884 ms / 3452 ms</td> <td style="text-align: right;">−25% / −15%</td> </tr> <tr> <td>Apple clang</td> <td>building the PCH</td> <td style="text-align: right;">—</td> <td style="text-align: right;">771 ms / 760 ms</td> <td style="text-align: right;">—</td> </tr> <tr> <tdLine truncated
</code></pre></div> <p>This removes the cost of parsing the header, but not of instantiating templates in each translation unit, so it combines well with the options above.</p> <div class=nj-fig-wrap> <p><svg class="nj-fig nj-charts nj-charts--compile" viewbox="0 0 440 282" role=img aria-labelledby="nj-charts-pch nj-charts-pch-d" xmlns=http://www.w3.org/2000/svg> <title id=nj-charts-pch>Compile time per translation unit with a precompiled json.hpp at -O0, and the one-off cost of the <abbr title="Precompiled Header">PCH</abbr></title> <desc id=nj-charts-pch-d>Horizontal bars, negative is faster, medians of nine runs, -std=c++17. model TU, Apple clang: -43 % (1045 ms to 594 ms); model TU, G&#8203;CC 16: -41 % (1789 ms to 1060 ms); parsing TU, Apple clang: -38 % (1148 ms to 714 ms); parsing TU, G&#8203;CC 16: -25 % (2498 ms to 1884 ms); one-off build, Apple clang: 771 ms; one-off build, G&#8203;CC 16: 2254 ms.</desc> <rect class=nj-charts-clang x=8 y=10 width=12 height=12 rx=3 /> <text class=nj-charts-leg x=26 y=20.5>Apple clang</text> <rect class=nj-charts-gcc x=126 y=10 width=12 height=12 rx=3 /> <text class=nj-charts-leg x=144 y=20.5>G&#8203;CC 16</text> <line class=nj-charts-grid x1=68.6667 y1=58 x2=68.6667 y2=160 /> <text class=nj-charts-tick x=68.6667 y=176>&#8722;50 %</text> <line class=nj-charts-grid x1=220.333 y1=58 x2=220.333 y2=160 /> <text class=nj-charts-tick x=220.333 y=176>&#8722;25 %</text> <text class=nj-charts-tick x=372 y=176>0 %</text> <text class="nj-charts-tick nj-charts-tick--l" x=8 y=194>&#8592; faster per TU</text> <text class=nj-charts-rowlabel x=8 y=62>model TU<tspan class=nj-charts-sub> &#183; with <abbr title="Precompiled Header">PCH</abbr></tspan></text> <path class=nj-charts-clang d="M372 70 H115.133 Q111.133 70 111.133 74 V78 Q111.133 82 115.133 82 H372 Z"><title>model TU, Apple clang: 1045 ms by default, 594 ms with <abbr title="Precompiled Header">PCH</abbr> (&#8722;43 %)</title></path> <text class=nj-charts-val x=377 y=80.5>&#8722;43 %</text> <path class=nj-charts-gcc d="M372 84 H127.267 Q123.267 84 123.267 88 V92 Q123.267 96 127.267 96 H372 Z"><title>model TU, G&#8203;CC 16: 1789 ms by default, 1060 ms with <abbr title="Precompiled Header">PCH</abbr> (&#8722;41 %)</title></path> <text class=nj-charts-val x=377 y=94.5>&#8722;41 %</text> <text class=nj-charts-rowlabel x=8 y=114>parsing TU<tspan class=nj-charts-sub> &#183; with <abbr title="Precompiled Header">PCH</abbr></tspan></text> <path class=nj-charts-clang d="M372 122 H145.467 Q141.467 122 141.467 126 V130 Q141.467 134 145.467 134 H372 Z"><title>parsing TU, Apple clang: 1148 ms by default, 714 ms with <abbr title="Precompiled Header">PCH</abbr> (&#8722;38 %)</title></path> <text class=nj-charts-val x=377 y=132.5>&#8722;38 %</text> <path class=nj-charts-gcc d="M372 136 H224.333 Q220.333 136 220.333 140 V144 Q220.333 148 224.333 148 H372 Z"><title>parsing TU, G&#8203;CC 16: 2498 ms by default, 1884 ms with <abbr title="Precompiled Header">PCH</abbr> (&#8722;25 %)</title></path> <text class=nj-charts-val x=377 y=146.5>&#8722;25 %</text> <line class=nj-charts-zero x1=372 y1=58 x2=372 y2=160 /> <text class=nj-charts-rowlabel x=8 y=222>One-off cost<tspan class=nj-charts-sub> &#183; built once, reused by every TU</tspan></text> <rect class=nj-charts-clang x=8 y=232.5 width=10 height=10 rx=2.5 /> <text class=nj-charts-val x=24 y=242>Apple clang: 771 ms once, saves 434 to 451 ms per TU</text> <rect class=nj-charts-gcc x=8 y=252.5 width=10 height=10 rx=2.5 /> <text class=nj-charts-val x=24 y=262>G&#8203;CC 16: 2254 ms once, saves 614 to 729 ms per TU</text> </svg></p> </div> <p class=nj-caption>Change in compile time per translation unit at <code>-O0</code> with a precompiled <code>&lt;nlohmann/json.hpp&gt;</code> (<code>-std=c++17</code>), and the one-off cost of building the precompiled header, taken from the table below.</p> <table> <thead> <tr> <th>Compiler</th> <th>Translation unit</th> <th style="text-align: right;">Default (<code>-O0</code> / <code>-O2</code>)</th> <th style="text-align: right;">With <abbr title="Precompiled Header">PCH</abbr> (<code>-O0</code> / <code>-O2</code>)</th> <th style="text-align: right;">Change</th> </tr> </thead> <tbody> <tr> <td>Apple clang</td> <td>model</td> <td style="text-align: right;">1045 ms / 1295 ms</td> <td style="text-align: right;">594 ms / 842 ms</td> <td style="text-align: right;">−43% / −35%</td> </tr> <tr> <td><abbr title="GNU Compiler Collection">GCC</abbr> 16</td> <td>model</td> <td style="text-align: right;">1789 ms / 2101 ms</td> <td style="text-align: right;">1060 ms / 1376 ms</td> <td style="text-align: right;">−41% / −35%</td> </tr> <tr> <td>Apple clang</td> <td>parsing</td> <td style="text-align: right;">1148 ms / 2008 ms</td> <td style="text-align: right;">714 ms / 1584 ms</td> <td style="text-align: right;">−38% / −21%</td> </tr> <tr> <td><abbr title="GNU Compiler Collection">GCC</abbr> 16</td> <td>parsing</td> <td style="text-align: right;">2498 ms / 407Line truncated
clang++<span class=w> </span>-std<span class=o>=</span>c++17<span class=w> </span>-O0<span class=w> </span>-I<span class=w> </span>single_include<span class=w> </span>-x<span class=w> </span>c++-header<span class=w> </span>pch.hpp<span class=w> </span>-o<span class=w> </span>pch.hpp.pch
clang++<span class=w> </span>-std<span class=o>=</span>c++17<span class=w> </span>-O0<span class=w> </span>-I<span class=w> </span>single_include<span class=w> </span>-include-pch<span class=w> </span>pch.hpp.pch<span class=w> </span>-include<span class=w> </span>pch.hpp<span class=w> </span>-c<span class=w> </span>model.cpp