Skip to content

Enable autoInline optimization#70

Merged
frostney merged 4 commits into
mainfrom
inline-auto
Mar 12, 2026
Merged

Enable autoInline optimization#70
frostney merged 4 commits into
mainfrom
inline-auto

Conversation

@frostney
Copy link
Copy Markdown
Owner

@frostney frostney commented Mar 12, 2026

Summary by CodeRabbit

  • Chores
    • Improved production build optimizations to deliver faster, more efficient application performance and reduced runtime overhead in deployment builds.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 12, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: df7315b6-bfee-47b8-8940-1a38acd7d1c0

📥 Commits

Reviewing files that changed from the base of the PR and between 368aec3 and e5e5cff.

📒 Files selected for processing (2)
  • build.pas
  • units/Goccia.inc
🚧 Files skipped from review as they are similar to previous changes (1)
  • units/Goccia.inc

📝 Walkthrough

Walkthrough

Adds automatic inlining to two Pascal include files' production blocks and appends the -B compiler flag in the production build args in build.pas; no other behavior or safety settings were changed.

Changes

Cohort / File(s) Summary
Production Optimization Directives
souffle/Souffle.inc, units/Goccia.inc
Inserted {$optimization autoInline} inside {$IFDEF PRODUCTION} blocks to enable automatic inlining in production builds.
Build Args
build.pas
Appended -B to the compiler arguments in the production (bmProd) branch to enable whole-program compilation/optimization.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 With a hop and a nibble, I peeked at the line,
Added a whisper of inline so functions align.
Small tweak, steady paw—no fury or fuss,
The build hums more tightly, from me to you, thus.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the primary change across all modified files - enabling the autoInline optimization directive in production builds.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch inline-auto

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@frostney frostney marked this pull request as ready for review March 12, 2026 09:20
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
units/Goccia.inc (1)

2-8: LGTM with minor nit: trailing whitespace on line 3.

The autoInline optimization is appropriately placed in the production block, consistent with the parallel change in souffle/Souffle.inc. This will enable aggressive inlining across all Goccia units that include this file during production builds.

,

🧹 Optional: Remove trailing whitespace
-  {$optimization autoInline} 
+  {$optimization autoInline}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@units/Goccia.inc` around lines 2 - 8, Remove the trailing whitespace after
the compiler directive "{$optimization autoInline}" in the production block;
open the file containing the "{$optimization autoInline}" line
(units/Goccia.inc), delete the extra space at the end of that line so it exactly
matches the other directives (no trailing spaces), and save the file to
eliminate the nit.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@units/Goccia.inc`:
- Around line 2-8: Remove the trailing whitespace after the compiler directive
"{$optimization autoInline}" in the production block; open the file containing
the "{$optimization autoInline}" line (units/Goccia.inc), delete the extra space
at the end of that line so it exactly matches the other directives (no trailing
spaces), and save the file to eliminate the nit.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ce4d17bf-4940-4e48-8423-4e713395f9f1

📥 Commits

Reviewing files that changed from the base of the PR and between a5b2874 and 368aec3.

📒 Files selected for processing (2)
  • souffle/Souffle.inc
  • units/Goccia.inc

@frostney frostney mentioned this pull request Mar 12, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 12, 2026

Benchmark Results

254 benchmarks

Interpreted: 🟢 10 improved · 🔴 6 regressed · 238 unchanged · avg +0.2%
Bytecode: 🟢 13 improved · 🔴 4 regressed · 237 unchanged · avg +0.9%

arraybuffer.js — Interp: 🔴 1, 13 unch. · avg -2.7% · Bytecode: 🟢 2, 12 unch. · avg +3.1%
Benchmark Interpreted Δ Bytecode Δ
create ArrayBuffer(0) 423,398 → 443,616 +4.8% 134,106 → 136,138 +1.5%
create ArrayBuffer(64) 411,033 → 422,982 +2.9% 135,878 → 136,595 +0.5%
create ArrayBuffer(1024) 324,477 → 327,247 +0.9% 122,607 → 125,081 +2.0%
create ArrayBuffer(8192) 141,232 → 140,846 -0.3% 79,789 → 82,198 +3.0%
slice full buffer (64 bytes) 527,658 → 508,649 -3.6% 332,962 → 357,595 🟢 +7.4%
slice half buffer (512 of 1024 bytes) 446,931 → 442,355 -1.0% 302,989 → 321,779 +6.2%
slice with negative indices 461,156 → 449,680 -2.5% 324,927 → 346,813 +6.7%
slice empty range 523,177 → 486,912 -6.9% 316,325 → 351,960 🟢 +11.3%
byteLength access 1,572,646 → 1,472,338 -6.4% 998,445 → 965,196 -3.3%
Symbol.toStringTag access 1,174,408 → 1,052,100 🔴 -10.4% 522,492 → 515,603 -1.3%
ArrayBuffer.isView 756,118 → 730,739 -3.4% 436,824 → 435,133 -0.4%
clone ArrayBuffer(64) 399,448 → 376,315 -5.8% 303,145 → 312,540 +3.1%
clone ArrayBuffer(1024) 310,099 → 301,971 -2.6% 243,657 → 251,666 +3.3%
clone ArrayBuffer inside object 265,436 → 255,009 -3.9% 149,999 → 154,793 +3.2%
arrays.js — Interp: 19 unch. · avg -1.0% · Bytecode: 19 unch. · avg -1.6%
Benchmark Interpreted Δ Bytecode Δ
Array.from length 100 13,884 → 13,826 -0.4% 12,142 → 12,196 +0.4%
Array.from 10 elements 228,629 → 230,716 +0.9% 150,691 → 153,721 +2.0%
Array.of 10 elements 311,322 → 315,259 +1.3% 210,986 → 210,494 -0.2%
spread into new array 333,441 → 326,939 -1.9% 558,688 → 565,779 +1.3%
map over 50 elements 27,638 → 27,892 +0.9% 21,361 → 20,667 -3.2%
filter over 50 elements 23,601 → 23,050 -2.3% 20,397 → 20,020 -1.8%
reduce sum 50 elements 27,346 → 26,834 -1.9% 18,529 → 17,418 -6.0%
forEach over 50 elements 23,239 → 22,979 -1.1% 21,381 → 21,771 +1.8%
find in 50 elements 35,528 → 35,203 -0.9% 26,585 → 25,790 -3.0%
sort 20 elements 12,245 → 12,126 -1.0% 3,072 → 2,910 -5.3%
flat nested array 117,478 → 115,120 -2.0% 271,870 → 272,374 +0.2%
flatMap 74,241 → 73,761 -0.6% 186,861 → 184,968 -1.0%
map inside map (5x5) 21,766 → 21,547 -1.0% 66,153 → 67,549 +2.1%
filter inside map (5x10) 16,568 → 15,849 -4.3% 12,757 → 12,449 -2.4%
reduce inside map (5x10) 20,237 → 19,862 -1.9% 12,876 → 12,583 -2.3%
forEach inside forEach (5x10) 16,964 → 16,946 -0.1% 14,358 → 14,081 -1.9%
find inside some (10x10) 14,313 → 14,190 -0.9% 10,050 → 9,681 -3.7%
map+filter chain nested (5x20) 5,532 → 5,391 -2.5% 4,213 → 4,103 -2.6%
reduce flatten (10x5) 39,913 → 40,001 +0.2% 5,881 → 5,634 -4.2%
async-await.js — Interp: 6 unch. · avg +1.5% · Bytecode: 🟢 1, 5 unch. · avg +6.2%
Benchmark Interpreted Δ Bytecode Δ
single await 378,225 → 380,729 +0.7% 257,264 → 272,545 +5.9%
multiple awaits 168,602 → 168,736 +0.1% 109,378 → 115,673 +5.8%
await non-Promise value 866,527 → 872,546 +0.7% 856,868 → 958,666 🟢 +11.9%
await with try/catch 365,491 → 373,181 +2.1% 252,672 → 268,340 +6.2%
await Promise.all 52,474 → 53,363 +1.7% 39,638 → 40,833 +3.0%
nested async function call 184,374 → 190,946 +3.6% 195,896 → 204,932 +4.6%
classes.js — Interp: 31 unch. · avg +0.1% · Bytecode: 31 unch. · avg +0.8%
Benchmark Interpreted Δ Bytecode Δ
simple class new 114,305 → 117,098 +2.4% 326,271 → 334,613 +2.6%
class with defaults 93,421 → 93,563 +0.2% 220,057 → 231,428 +5.2%
50 instances via Array.from 5,482 → 5,565 +1.5% 5,835 → 6,119 +4.9%
instance method call 59,419 → 59,013 -0.7% 147,788 → 152,769 +3.4%
static method call 89,424 → 90,126 +0.8% 353,594 → 348,474 -1.4%
single-level inheritance 46,078 → 45,890 -0.4% 150,230 → 149,172 -0.7%
two-level inheritance 39,033 → 38,844 -0.5% 121,791 → 120,991 -0.7%
private field access 58,217 → 58,283 +0.1% 163,733 → 166,462 +1.7%
private methods 63,445 → 63,442 -0.0% 195,554 → 206,979 +5.8%
getter/setter access 66,145 → 65,447 -1.1% 164,578 → 166,248 +1.0%
class decorator (identity) 81,979 → 81,571 -0.5% 52,638 → 51,702 -1.8%
class decorator (wrapping) 47,264 → 47,180 -0.2% 36,369 → 35,937 -1.2%
identity method decorator 58,603 → 58,425 -0.3% 42,992 → 42,290 -1.6%
wrapping method decorator 48,354 → 48,348 -0.0% 39,448 → 38,861 -1.5%
stacked method decorators (x3) 34,396 → 35,380 +2.9% 27,356 → 27,397 +0.1%
identity field decorator 67,283 → 67,867 +0.9% 45,181 → 45,029 -0.3%
field initializer decorator 56,708 → 56,099 -1.1% 40,314 → 39,898 -1.0%
getter decorator (identity) 57,391 → 56,546 -1.5% 39,959 → 40,122 +0.4%
setter decorator (identity) 48,401 → 48,001 -0.8% 34,424 → 34,528 +0.3%
static method decorator 62,237 → 62,729 +0.8% 61,754 → 61,837 +0.1%
static field decorator 72,977 → 71,542 -2.0% 65,059 → 65,177 +0.2%
private method decorator 48,065 → 48,426 +0.8% 36,489 → 36,251 -0.7%
private field decorator 53,742 → 53,070 -1.2% 37,192 → 37,661 +1.3%
plain auto-accessor (no decorator) 92,468 → 91,660 -0.9% 52,871 → 52,313 -1.1%
auto-accessor with decorator 52,242 → 54,161 +3.7% 36,518 → 36,240 -0.8%
decorator writing metadata 44,303 → 44,083 -0.5% 40,565 → 40,613 +0.1%
static getter read 105,730 → 106,213 +0.5% 365,952 → 372,732 +1.9%
static getter/setter pair 78,880 → 79,732 +1.1% 196,296 → 201,878 +2.8%
inherited static getter 59,693 → 58,867 -1.4% 248,928 → 253,531 +1.8%
inherited static setter 64,421 → 65,124 +1.1% 196,347 → 200,836 +2.3%
inherited static getter with this binding 54,386 → 54,525 +0.3% 144,887 → 147,885 +2.1%
closures.js — Interp: 11 unch. · avg +0.6% · Bytecode: 11 unch. · avg +0.8%
Benchmark Interpreted Δ Bytecode Δ
closure over single variable 131,561 → 134,331 +2.1% 597,964 → 596,659 -0.2%
closure over multiple variables 120,405 → 122,078 +1.4% 385,537 → 390,647 +1.3%
nested closures 126,623 → 127,744 +0.9% 551,583 → 534,814 -3.0%
function as argument 98,165 → 96,499 -1.7% 487,312 → 492,516 +1.1%
function returning function 120,873 → 119,248 -1.3% 576,046 → 583,739 +1.3%
compose two functions 73,091 → 69,582 -4.8% 340,621 → 347,677 +2.1%
fn.call 151,963 → 151,709 -0.2% 124,323 → 127,550 +2.6%
fn.apply 113,756 → 118,666 +4.3% 86,635 → 86,065 -0.7%
fn.bind 139,150 → 141,188 +1.5% 130,904 → 133,599 +2.1%
recursive sum to 50 12,189 → 12,032 -1.3% 37,931 → 38,419 +1.3%
recursive tree traversal 19,939 → 21,022 +5.4% 57,446 → 57,937 +0.9%
collections.js — Interp: 🟢 1, 🔴 3, 8 unch. · avg -1.2% · Bytecode: 🔴 2, 10 unch. · avg -3.7%
Benchmark Interpreted Δ Bytecode Δ
add 50 elements 7,083 → 7,052 -0.4% 5,464 → 5,396 -1.3%
has lookup (50 elements) 87,707 → 85,643 -2.4% 82,582 → 80,759 -2.2%
delete elements 46,219 → 46,163 -0.1% 35,419 → 35,243 -0.5%
forEach iteration 16,489 → 16,762 +1.7% 14,519 → 14,870 +2.4%
spread to array 33,382 → 34,496 +3.3% 139,840 → 131,623 -5.9%
deduplicate array 42,097 → 46,383 🟢 +10.2% 45,229 → 45,327 +0.2%
set 50 entries 5,202 → 5,319 +2.3% 5,589 → 5,249 -6.1%
get lookup (50 entries) 86,865 → 79,277 🔴 -8.7% 93,369 → 83,917 🔴 -10.1%
has check 130,211 → 120,306 🔴 -7.6% 147,086 → 132,490 🔴 -9.9%
delete entries 46,233 → 42,442 🔴 -8.2% 34,251 → 32,192 -6.0%
forEach iteration 17,265 → 16,737 -3.1% 15,103 → 14,789 -2.1%
keys/values/entries 9,304 → 9,150 -1.7% 20,320 → 19,748 -2.8%
destructuring.js — Interp: 🟢 1, 21 unch. · avg +0.1% · Bytecode: 🟢 1, 21 unch. · avg +1.4%
Benchmark Interpreted Δ Bytecode Δ
simple array destructuring 424,850 → 432,955 +1.9% 624,407 → 631,776 +1.2%
with rest element 296,358 → 284,226 -4.1% 487,036 → 496,988 +2.0%
with defaults 421,843 → 447,828 +6.2% 670,621 → 684,118 +2.0%
skip elements 459,961 → 436,751 -5.0% 709,845 → 724,708 +2.1%
nested array destructuring 184,845 → 188,289 +1.9% 337,475 → 350,402 +3.8%
swap variables 534,174 → 552,946 +3.5% 958,988 → 954,293 -0.5%
simple object destructuring 299,890 → 332,781 🟢 +11.0% 500,276 → 494,804 -1.1%
with defaults 368,642 → 376,951 +2.3% 304,264 → 304,902 +0.2%
with renaming 324,050 → 306,259 -5.5% 550,944 → 555,161 +0.8%
nested object destructuring 156,538 → 156,259 -0.2% 240,750 → 231,469 -3.9%
rest properties 188,881 → 200,456 +6.1% 227,326 → 225,485 -0.8%
object parameter 92,746 → 92,331 -0.4% 178,887 → 183,367 +2.5%
array parameter 125,712 → 125,546 -0.1% 308,972 → 319,592 +3.4%
mixed destructuring in map 35,960 → 34,140 -5.1% 33,025 → 33,188 +0.5%
forEach with array destructuring 68,108 → 69,786 +2.5% 134,975 → 136,908 +1.4%
map with array destructuring 70,047 → 70,971 +1.3% 162,913 → 167,727 +3.0%
filter with array destructuring 75,619 → 74,255 -1.8% 192,114 → 197,005 +2.5%
reduce with array destructuring 79,107 → 76,901 -2.8% 180,511 → 183,080 +1.4%
map with object destructuring 80,961 → 78,315 -3.3% 69,341 → 70,338 +1.4%
map with nested destructuring 66,208 → 64,838 -2.1% 53,019 → 57,859 🟢 +9.1%
map with rest in destructuring 41,109 → 39,336 -4.3% 42,968 → 44,508 +3.6%
map with defaults in destructuring 61,317 → 61,873 +0.9% 34,933 → 33,471 -4.2%
fibonacci.js — Interp: 🟢 3, 5 unch. · avg +1.9% · Bytecode: 🟢 1, 7 unch. · avg +1.9%
Benchmark Interpreted Δ Bytecode Δ
recursive fib(15) 338 → 330 -2.4% 1,121 → 1,121 -0.0%
recursive fib(20) 30 → 29 -3.5% 101 → 101 -0.2%
recursive fib(15) typed 334 → 334 +0.0% 1,434 → 1,420 -1.0%
recursive fib(20) typed 30 → 28 -4.0% 129 → 129 -0.4%
iterative fib(20) via reduce 12,135 → 12,263 +1.1% 7,930 → 8,141 +2.7%
iterator fib(20) 9,581 → 10,253 🟢 +7.0% 13,078 → 14,227 🟢 +8.8%
iterator fib(20) via Iterator.from + take 14,800 → 16,300 🟢 +10.1% 16,124 → 16,844 +4.5%
iterator fib(20) last value via reduce 11,404 → 12,209 🟢 +7.1% 12,133 → 12,283 +1.2%
for-of.js — Interp: 🟢 1, 6 unch. · avg +4.0% · Bytecode: 🟢 1, 6 unch. · avg -0.0%
Benchmark Interpreted Δ Bytecode Δ
for...of with 10-element array 47,956 → 51,564 🟢 +7.5% 151,385 → 148,255 -2.1%
for...of with 100-element array 5,588 → 5,965 +6.8% 20,823 → 20,199 -3.0%
for...of with string (10 chars) 35,254 → 37,065 +5.1% 119,770 → 118,163 -1.3%
for...of with Set (10 elements) 49,346 → 51,864 +5.1% 149,132 → 148,779 -0.2%
for...of with Map entries (10 entries) 32,077 → 31,696 -1.2% 41,500 → 45,183 🟢 +8.9%
for...of with destructuring 43,717 → 46,095 +5.4% 86,546 → 86,251 -0.3%
for-await-of with sync array 48,525 → 48,266 -0.5% 129,906 → 127,424 -1.9%
iterators.js — Interp: 20 unch. · avg +0.9% · Bytecode: 20 unch. · avg +1.1%
Benchmark Interpreted Δ Bytecode Δ
Iterator.from({next}).toArray() — 20 elements 15,570 → 15,096 -3.0% 15,796 → 16,289 +3.1%
Iterator.from({next}).toArray() — 50 elements 6,806 → 6,735 -1.0% 6,556 → 6,976 +6.4%
spread pre-wrapped iterator — 20 elements 12,130 → 12,414 +2.3% 15,639 → 15,091 -3.5%
Iterator.from({next}).forEach — 50 elements 4,759 → 4,853 +2.0% 5,045 → 5,097 +1.0%
Iterator.from({next}).reduce — 50 elements 4,841 → 4,842 +0.0% 4,947 → 4,926 -0.4%
wrap array iterator 182,506 → 183,294 +0.4% 117,223 → 119,154 +1.6%
wrap plain {next()} object 11,294 → 10,622 -5.9% 11,178 → 11,540 +3.2%
map + toArray (50 elements) 4,893 → 5,043 +3.1% 5,048 → 5,025 -0.5%
filter + toArray (50 elements) 4,828 → 4,911 +1.7% 4,972 → 5,053 +1.6%
take(10) + toArray (50 element source) 29,277 → 30,668 +4.7% 27,677 → 28,202 +1.9%
drop(40) + toArray (50 element source) 7,170 → 7,377 +2.9% 7,133 → 7,338 +2.9%
chained map + filter + take (100 element source) 9,089 → 9,286 +2.2% 8,852 → 9,080 +2.6%
some + every (50 elements) 2,799 → 2,897 +3.5% 2,918 → 2,902 -0.6%
find (50 elements) 6,091 → 6,176 +1.4% 6,343 → 6,363 +0.3%
array.values().map().filter().toArray() 9,684 → 10,006 +3.3% 8,734 → 8,783 +0.6%
array.values().take(5).toArray() 221,826 → 226,114 +1.9% 148,459 → 151,653 +2.2%
array.values().drop(45).toArray() 210,479 → 211,973 +0.7% 141,690 → 143,565 +1.3%
map.entries() chained helpers 12,067 → 11,391 -5.6% 5,214 → 5,162 -1.0%
set.values() chained helpers 20,187 → 19,720 -2.3% 18,870 → 18,832 -0.2%
string iterator map + toArray 14,605 → 15,377 +5.3% 20,154 → 20,001 -0.8%
json.js — Interp: 🟢 3, 17 unch. · avg +1.3% · Bytecode: 🟢 4, 16 unch. · avg +3.8%
Benchmark Interpreted Δ Bytecode Δ
parse simple object 161,827 → 182,413 🟢 +12.7% 132,333 → 150,346 🟢 +13.6%
parse nested object 100,837 → 109,758 🟢 +8.8% 92,914 → 98,696 +6.2%
parse array of objects 55,271 → 61,035 🟢 +10.4% 52,294 → 59,866 🟢 +14.5%
parse large flat object 49,770 → 50,074 +0.6% 45,721 → 50,007 🟢 +9.4%
parse mixed types 70,766 → 72,523 +2.5% 65,892 → 67,260 +2.1%
stringify simple object 208,054 → 203,337 -2.3% 160,633 → 158,781 -1.2%
stringify nested object 114,419 → 113,751 -0.6% 89,402 → 89,765 +0.4%
stringify array of objects 62,780 → 61,181 -2.5% 50,329 → 51,192 +1.7%
stringify mixed types 87,993 → 92,221 +4.8% 72,978 → 73,094 +0.2%
reviver doubles numbers 44,852 → 45,195 +0.8% 44,162 → 44,497 +0.8%
reviver filters properties 38,118 → 38,873 +2.0% 40,190 → 44,909 🟢 +11.7%
reviver on nested object 50,591 → 51,594 +2.0% 50,179 → 49,122 -2.1%
reviver on array 30,009 → 29,086 -3.1% 27,572 → 28,760 +4.3%
replacer function doubles numbers 49,446 → 47,895 -3.1% 48,590 → 48,326 -0.5%
replacer function excludes properties 62,762 → 60,217 -4.1% 57,602 → 58,139 +0.9%
array replacer (allowlist) 120,314 → 114,416 -4.9% 92,908 → 95,736 +3.0%
stringify with 2-space indent 98,466 → 98,611 +0.1% 76,451 → 77,958 +2.0%
stringify with tab indent 98,912 → 97,784 -1.1% 76,669 → 77,838 +1.5%
parse then stringify 54,344 → 55,280 +1.7% 48,460 → 50,238 +3.7%
stringify then parse 31,334 → 31,962 +2.0% 29,173 → 30,432 +4.3%
jsx.jsx — Interp: 21 unch. · avg -0.1% · Bytecode: 🟢 1, 🔴 1, 19 unch. · avg +0.9%
Benchmark Interpreted Δ Bytecode Δ
simple element 204,277 → 207,273 +1.5% 648,561 → 593,133 🔴 -8.5%
self-closing element 211,803 → 208,998 -1.3% 609,575 → 593,324 -2.7%
element with string attribute 174,806 → 172,245 -1.5% 399,198 → 412,407 +3.3%
element with multiple attributes 148,629 → 149,877 +0.8% 357,861 → 364,556 +1.9%
element with expression attribute 165,806 → 159,596 -3.7% 425,202 → 418,142 -1.7%
text child 206,158 → 216,312 +4.9% 582,415 → 588,681 +1.1%
expression child 200,267 → 203,174 +1.5% 576,300 → 578,102 +0.3%
mixed text and expression 194,319 → 193,400 -0.5% 528,163 → 511,787 -3.1%
nested elements (3 levels) 77,899 → 77,639 -0.3% 230,318 → 225,006 -2.3%
sibling children 57,071 → 57,535 +0.8% 176,376 → 181,318 +2.8%
component element 144,573 → 140,063 -3.1% 412,551 → 401,307 -2.7%
component with children 89,769 → 87,733 -2.3% 247,355 → 270,453 🟢 +9.3%
dotted component 123,754 → 124,191 +0.4% 299,213 → 311,149 +4.0%
empty fragment 215,563 → 223,098 +3.5% 627,910 → 640,415 +2.0%
fragment with children 57,093 → 57,053 -0.1% 173,867 → 177,018 +1.8%
spread attributes 107,529 → 109,378 +1.7% 106,812 → 108,915 +2.0%
spread with overrides 96,172 → 96,157 -0.0% 81,445 → 83,193 +2.1%
shorthand props 162,632 → 163,329 +0.4% 397,130 → 401,857 +1.2%
nav bar structure 27,379 → 27,785 +1.5% 77,013 → 79,009 +2.6%
card component tree 31,808 → 31,613 -0.6% 82,999 → 85,524 +3.0%
10 list items via Array.from 15,230 → 14,513 -4.7% 22,490 → 23,187 +3.1%
numbers.js — Interp: 🔴 2, 9 unch. · avg -1.4% · Bytecode: 11 unch. · avg +1.9%
Benchmark Interpreted Δ Bytecode Δ
integer arithmetic 552,628 → 507,121 🔴 -8.2% 1,469,275 → 1,474,616 +0.4%
floating point arithmetic 600,144 → 538,854 🔴 -10.2% 1,529,579 → 1,586,916 +3.7%
number coercion 188,895 → 179,959 -4.7% 125,661 → 127,577 +1.5%
toFixed 104,409 → 106,103 +1.6% 205,458 → 204,439 -0.5%
toString 157,953 → 161,724 +2.4% 655,818 → 672,278 +2.5%
valueOf 228,853 → 228,500 -0.2% 914,950 → 895,474 -2.1%
toPrecision 150,772 → 147,688 -2.0% 385,743 → 401,524 +4.1%
Number.isNaN 303,636 → 302,281 -0.4% 160,380 → 165,545 +3.2%
Number.isFinite 293,687 → 299,437 +2.0% 153,951 → 158,507 +3.0%
Number.isInteger 286,552 → 289,354 +1.0% 168,210 → 173,488 +3.1%
Number.parseInt and parseFloat 241,286 → 250,023 +3.6% 140,981 → 143,507 +1.8%
objects.js — Interp: 7 unch. · avg +1.1% · Bytecode: 🟢 1, 6 unch. · avg +0.4%
Benchmark Interpreted Δ Bytecode Δ
create simple object 461,777 → 487,624 +5.6% 849,327 → 848,891 -0.1%
create nested object 219,857 → 225,022 +2.3% 369,059 → 370,012 +0.3%
create 50 objects via Array.from 9,098 → 9,098 -0.0% 7,717 → 7,853 +1.8%
property read 600,128 → 583,870 -2.7% 629,198 → 629,879 +0.1%
Object.keys 293,261 → 286,972 -2.1% 198,577 → 212,506 🟢 +7.0%
Object.entries 106,897 → 107,817 +0.9% 70,429 → 65,652 -6.8%
spread operator 183,479 → 190,985 +4.1% 197,061 → 198,417 +0.7%
promises.js — Interp: 🟢 1, 11 unch. · avg +2.7% · Bytecode: 🟢 1, 🔴 1, 10 unch. · avg +0.2%
Benchmark Interpreted Δ Bytecode Δ
Promise.resolve(value) 551,487 → 577,907 +4.8% 355,332 → 355,317 -0.0%
new Promise(resolve => resolve(value)) 192,920 → 194,401 +0.8% 166,294 → 164,091 -1.3%
Promise.reject(reason) 559,466 → 571,690 +2.2% 316,918 → 322,357 +1.7%
resolve + then (1 handler) 171,544 → 175,814 +2.5% 150,679 → 159,045 +5.6%
resolve + then chain (3 deep) 70,883 → 69,525 -1.9% 71,547 → 71,302 -0.3%
resolve + then chain (10 deep) 21,739 → 22,931 +5.5% 26,653 → 24,212 🔴 -9.2%
reject + catch + then 97,188 → 104,711 🟢 +7.7% 95,724 → 102,449 🟢 +7.0%
resolve + finally + then 87,150 → 88,458 +1.5% 85,619 → 86,688 +1.2%
Promise.all (5 resolved) 33,870 → 35,081 +3.6% 28,339 → 26,539 -6.4%
Promise.race (5 resolved) 36,087 → 36,285 +0.5% 28,811 → 27,851 -3.3%
Promise.allSettled (5 mixed) 29,201 → 29,709 +1.7% 22,926 → 23,367 +1.9%
Promise.any (5 mixed) 34,657 → 35,849 +3.4% 27,030 → 28,358 +4.9%
strings.js — Interp: 11 unch. · avg -0.2% · Bytecode: 11 unch. · avg -0.6%
Benchmark Interpreted Δ Bytecode Δ
string concatenation 404,017 → 412,812 +2.2% 400,152 → 401,093 +0.2%
template literal 666,405 → 695,282 +4.3% 631,284 → 592,821 -6.1%
string repeat 412,574 → 428,925 +4.0% 926,476 → 902,984 -2.5%
split and join 137,302 → 144,035 +4.9% 284,986 → 290,452 +1.9%
indexOf and includes 171,003 → 179,486 +5.0% 527,451 → 527,323 -0.0%
toUpperCase and toLowerCase 261,921 → 262,399 +0.2% 648,843 → 644,294 -0.7%
slice and substring 166,677 → 164,519 -1.3% 584,428 → 572,924 -2.0%
trim operations 194,218 → 184,387 -5.1% 694,955 → 679,633 -2.2%
replace and replaceAll 217,074 → 205,438 -5.4% 591,574 → 593,450 +0.3%
startsWith and endsWith 138,441 → 129,739 -6.3% 453,816 → 460,357 +1.4%
padStart and padEnd 204,418 → 195,289 -4.5% 522,312 → 537,447 +2.9%
typed-arrays.js — Interp: 22 unch. · avg -0.3% · Bytecode: 22 unch. · avg +0.6%
Benchmark Interpreted Δ Bytecode Δ
new Int32Array(0) 327,606 → 325,159 -0.7% 118,364 → 121,120 +2.3%
new Int32Array(100) 302,565 → 304,058 +0.5% 115,243 → 115,656 +0.4%
new Int32Array(1000) 173,684 → 175,725 +1.2% 112,045 → 113,623 +1.4%
new Float64Array(100) 270,398 → 279,391 +3.3% 112,399 → 116,044 +3.2%
Int32Array.from([...]) 186,844 → 185,847 -0.5% 62,112 → 62,093 -0.0%
Int32Array.of(1, 2, 3, 4, 5) 327,150 → 329,599 +0.7% 230,298 → 234,958 +2.0%
sequential write 100 elements 3,805 → 3,714 -2.4% 12,372 → 12,594 +1.8%
sequential read 100 elements 3,853 → 3,833 -0.5% 9,906 → 9,674 -2.3%
Float64Array write 100 elements 3,511 → 3,497 -0.4% 11,638 → 11,838 +1.7%
fill(42) 45,717 → 47,283 +3.4% 42,871 → 45,030 +5.0%
slice() 213,020 → 211,942 -0.5% 181,868 → 182,291 +0.2%
map(x => x * 2) 8,448 → 8,185 -3.1% 7,127 → 6,814 -4.4%
filter(x => x > 50) 8,674 → 8,285 -4.5% 7,132 → 7,331 +2.8%
reduce (sum) 8,151 → 8,114 -0.5% 6,242 → 6,201 -0.7%
sort() 176,566 → 172,345 -2.4% 147,347 → 151,440 +2.8%
indexOf() 452,540 → 466,081 +3.0% 337,444 → 339,267 +0.5%
reverse() 340,463 → 343,086 +0.8% 259,096 → 260,502 +0.5%
create view over existing buffer 414,535 → 401,967 -3.0% 129,378 → 130,974 +1.2%
subarray() 477,483 → 469,165 -1.7% 323,066 → 333,313 +3.2%
set() from array 609,318 → 619,031 +1.6% 233,641 → 237,171 +1.5%
for-of loop 5,502 → 5,508 +0.1% 17,879 → 17,248 -3.5%
spread into array 19,457 → 19,269 -1.0% 65,789 → 62,194 -5.5%

Measured on ubuntu-latest x64. Changes within ±7% are considered insignificant.

@frostney frostney merged commit 8124fc2 into main Mar 12, 2026
8 checks passed
@frostney frostney deleted the inline-auto branch March 12, 2026 10:37
@frostney frostney added the performance Performance improvement label Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance Performance improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant