[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7DDBPBA3YCNEWST8EKXJGTE":3,"skill-same:01M7DDBPBA3YCNEWST8EKXJGTE":54},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M7DDBPBA3YCNEWST8EKXJGTE","bend-perf",null,"Audit and speed up bise's Bend code (sb-core in bend\u002Fhub, the agent runtime in bend\u002Fruntime) without changing what it does - measure first, find the costly patterns (eager picks, full list walks, string appends, unused fork\u002Fjoin), fix them with the same results and laws. Use when asked to make the Bend code faster, to audit its performance or its use of parallelism, or before optimizing any .bend file.","gvergnaud\u002Fbise","gvergnaud","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F9265418?v=4","01M7DDBF4P9FC0JR6BJDMX1Q2J","Gabriel Vergnaud","01M7DDBF5FKMW0JNE71GV5SKBN",51,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fgvergnaud\u002Fbise\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fbend-perf\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: bend-perf\ndescription: Audit and speed up bise's Bend code (sb-core in bend\u002Fhub, the agent runtime in bend\u002Fruntime) without changing what it does - measure first, find the costly patterns (eager picks, full list walks, string appends, unused fork\u002Fjoin), fix them with the same results and laws. Use when asked to make the Bend code faster, to audit its performance or its use of parallelism, or before optimizing any .bend file.\n---\n\n# bend-perf\n\nHow to find and fix slow Bend in bise. Same results, same laws: a perf change\nnever changes what a step answers or writes.\n\n## 0. Read the language first\n\nRun `bend guide` (or `~\u002F.bend\u002Fbin\u002Fbend guide`) and read \"Recursion\",\n\"Parallelism\", \"IO and Concurrency\" and \"Under the Hood\". Look up any Base def\nwith `bend base \u003Cname>` before relying on how it evaluates. The facts this\naudit rests on:\n\n- **Bend is strict.** Every argument of a call is computed before the call.\n  `Bool.pick(c, a, b)`, `a && b`, `a || b` (`Bool.and`\u002F`Bool.or`) are plain\n  defs, so BOTH sides are computed. Only a `match` runs one branch.\n- **A `match` inspects a parameter only.** To branch lazily on a computed\n  Bool, pass it to a helper def that matches on its parameter.\n- **Strings are cons lists of chars** (`SCon{head, tail}`): `a ++ b` costs\n  the length of `a`. Building output by appending is quadratic; build a list\n  of chunks and join once (vendor\u002Fjson's join_chunks).\n- **Parallelism: read `parallelism.md` (next to this file) before you write\n  a def that walks a list or a tree.** Its rules, each measured: only a\n  parallel let `a b = f(x) g(y)` forks (two lets on two lines never do);\n  only the native build runs it in parallel (sb-core, repl-live; not the\n  JS target); two halves of equal cost (a lopsided split caps the gain);\n  a list split a few levels deep then folded, only when each item is real\n  work (a parse, a stringify: B2 1.85x; a cheap test: B3 never faster,\n  twice the CPU); an accumulator, an early exit and a serial envelope\n  block it; check with `--threads 1` vs `8` and CPU \u002F wall.\n- **`IO.fork`\u002F`IO.join`** run effects concurrently on the event loop, one\n  computation at a time: for waits (network, processes), not for CPU\n  (measured: two forked 2 s computations used 1.0 core).\n- **A hub step is sequential** (each step reads the state the previous one\n  wrote). Parallelism fits only pure bulk work inside one step or one batch.\n\n## 1. Measure (never optimise unmeasured)\n\nsb-core on a copy of a real journal (read-only, its own sb-core):\n\n    B=$(scripts\u002Fbins.sh path sb-core)\n    \u002Fusr\u002Fbin\u002Flockf -k ~\u002F.bise\u002Frun\u002Fheavy.lock nice -n 10 \\\n      python3 scripts\u002Fcore_profile.py \"$B\" ~\u002F.bise\u002Fhubs\u002F\u003Chub>\u002Fjournal.jsonl --out \"$TMPDIR\"\n\nIt prints the boot replay time, a Tick, a `say`, `view_all`, and writes three\n`sample` files. In each, the \"Sort by top of stack\" list names the hot defs as\n`WL_FID_\u003CFILE>_\u003CDEF>` (`WL_FID_MODEL_QUEUED_IN` = model.bend `queued_in`);\n`rfc_wrap`, `span_fade`, `term_drop`, `heap_alloc_miss` are the runtime's\nmemory work (many allocations: usually string building).\n\nUnder load, wall time is noise: compare **retired instructions and cycles**\n(`\u002Fusr\u002Fbin\u002Ftime -l \u003Csb-core>` around the run, or a driver that reads them),\ntwo runs each, base vs change. And read the sample for the runtime's own\nmemory work (`term_drop`, `span_fade`, `rfc_wrap`, `heap_alloc_miss`): in\nbise's Bend the cost is usually allocating and freeing (a buffer appended\nand rescanned, a parsed value dropped, a unary `Nat` fuel built then\nthrown away), more than the compares themselves.\n\nThe Rust side of a step: `SB_BENCH_JOURNAL=\u003Ccopy> cargo test -p switchboard\nbench_step -- --ignored --nocapture` (sb-core vs rust split per step).\n\nThe agent runtime (repl-live): `ps -o time` against its age, then `sample\n\u003Cpid> 5`. If it sits in poll\u002Fselect, it waits on the network: nothing to win.\n\n## 2. The patterns to look for (cheapest fix first)\n\n1. **Eager pick in a search**: `Bool.pick(c, Some{h}, find(t, k))` or\n   `eq(h) || in(t)`: the recursion runs to the end of the list even after a\n   hit. Fix: a helper that matches on the Bool and recurses only in the\n   False branch. Find them: a def whose own name appears inside a\n   `Bool.pick(`, `&&` or `||` on the same line. tests\u002Fpick_gate.py already\n   refuses the exponential case (the def called twice).\n2. **Expensive test first**: `str_in(names, to) && is_queued(st)` compares\n   strings for every message, queued or not. Match the cheap test first.\n   In a hot loop use a real helper that matches, not a thunk\n   (`LZ.and(a, u => b)`): a closure and a cons per element cost more than\n   they save (bp-lazy: thunks gave 41 -> 28 ms, the match 41 -> 10.6 ms).\n3. **Full walks per step** over everything (all messages, all agents,\n   archived included): keep the hot set apart (issue 21's split), or index it.\n4. **Appends in a loop**: `acc ++ piece` or `xs \u003C> [x]`: chunks, then one join;\n   cons then one reverse.\n5. **Pure bulk work done one by one** where the items are independent and\n   costly (parsing a batch of journal events, stringifying the view's agent\n   rows): split in balanced halves and use a parallel let. Before you\n   fork, measure the sequential envelope around it: a batch that still\n   arrives as one JSON string pays a char-by-char decode first (bp-boot,\n   2026-10-17: the outer string cost more than the whole old replay), and\n   check the sample shows more than one core busy (1.1 cores = no gain).\n   Make the per-char work cheap (pattern 1) before you split it. How to\n   shape it and what it gains: `parallelism.md`.\n\n## 3. Change it safely\n\n- One pattern per commit. The same answers: `old_core_replay.py` green, the\n  bench_byte_equal digest equal before\u002Fafter (`SB_CORE_BIN` = each build),\n  ALL PROOFS CHECK (a law may unfold the def you rewrote).\n- Before\u002Fafter numbers from core_profile.py in the commit message, same\n  journal copy, same load (under the heavy lock).\n- Bend rules from `bise-implement` hold: laws for any changed decision (a perf change changes none).\n\n## 4. Keep the record\n\nAdd a dated line to \"Audits\" below: what was measured, what changed, the\nnumbers. The next audit starts from there.\n\n## Audits\n\n- 2026-10-17 (architect, page bend-perf): his journal copy, 112,404 events.\n  Boot replay 23-30 s (JSON parse about a third, then string appends and\n  memory work); Tick 35 ms (model.bend queued_in + STRING_CMP: every message,\n  delivered ones too, compared against names); say 15 ms (answer 10.8 KB);\n  view_all 2.1 s for 30 MB (quote_string, string appends), at boot and\n  restore only. Step answers are small (tick 138 B), not the whole view.\n  34 searches in bend\u002Fhub walk the whole list (eager pick); zero parallel\n  lets or IO.fork in bend\u002F. repl-live: idle in poll (network-bound).\n- 2026-10-17 (bp-boot): the boot replay, his journal copy (112,470 events),\n  sb-core under `\u002Fusr\u002Fbin\u002Ftime -l` (retired instructions; wall time was\n  noise at load 20+). Base, batch 100: 133.3G instructions, 46.9G cycles.\n  Eager picks in vendor json's classifiers made lazy (matches on the\n  char): -1% (132.0G). The input path (main.bend read each recv'd chunk\n  by appending to the buffer and rescanning it whole): each char read once,\n  119.3G (-10%), cycles 34.7-38.5G (-18%). REPLAY_BATCH 100 -> 250: 113.7G\n  (batch 500: 112.2G; cycles flat 100-500, up past 1000). Tried and\n  dropped: a `replay_lines` link with the batch's lines parsed in parallel\n  (the outer JSON string's decode alone cost more than the old replay:\n  every quote escaped; parse_step is ~5% of the replay, the cap of any\n  parallel parse); parse's fuel as a constant (-0.8%). What is left is the\n  runtime's memory work: allocating and freeing each line, its parsed\n  Json and each event (term_drop, span_fade, rfc_wrap in the sample).\n- 2026-10-17 (bp-view, chunk 3): view_all on the same journal copy,\n  back to back in one heavy slot (load ~8): 1.92 s -> 1.13-1.25 s, bytes\n  identical (sha256 f170e123b550). vendor json: quote_string in one pass\n  (escape_onto_str), and stringify prints a JArr of 256+ items in\n  parallel halves (PItems, 6 levels) joined once: 1.92 -> 1.5 s.\n  main.bend send_line: the newline as its own send, no 30 MB append:\n  1.5 -> 1.2 s. Left, serial: join_chunks_loop's copy of the 30 MB\n  (~0.2 s) and io_cbuf's String -> bytes (~0.17 s); next step if\n  view_all matters more: answer as a list of parts, one send each.\n- 2026-10-17 (bp-lazy, chunk 1): searches stop at their hit. hub\u002Flazy.bend\n  (LZ.pick, LZ.or, LZ.and: the second side a thunk `u => f(t)`) in every\n  Maybe\u002FBool search of bend\u002Fhub and the put\u002Fset ones (the full maps,\n  rename\u002Fmark, stay maps: no law says their key is unique); queued_in\n  matches is_queued first (queued_in.keep), str_in only for a queued\n  message. Same journal copy, back to back: Tick 41.4 -> 10.6 ms (the\n  first try, LZ.and in a Bool.pick, gave 28 ms: a closure and a cons per\n  message, then dropped), say ~15.5 -> ~13.4 ms, replay 21.5 -> 17.8 s;\n  digest identical. pick_gate's third check refuses a strict search in\n  bend\u002Fhub. Left: queued_in still walks every hot message (14k on his\n  hub, term_drop is most of the 10 ms).\n- 2026-10-22 (big-msg-perf): repl-live, one 2 MB `say` on the fake\n  provider (\u002Fusr\u002Fbin\u002Ftime -l). Base 317.6e9 instructions, 53.5 s user,\n  sample: STRING_SPLIT, STRING_APPEND, term_drop under repl_conn and\n  cmd_whole: repl-core.bend appended each 4096-byte recv to the\n  unfinished line and split the whole line twice per recv. Now\n  repl-core-pure's feed keeps the line as its pieces, splits only the\n  new chunk and joins once: 25.0e9, 2.28 s user (small turn: 5.65e9,\n  0.66 s), request body sha256 identical (2 MB and small).\n  tests\u002Frepl_read_cost.py (run_all): x3.8 instructions for x4 the line,\n  x14.8 on the old path. Left (follow-up): the rest is linear, led by\n  the memory work (term_drop 213, rfc_wrap 149, span_fade 122 in the\n  2 MB after-sample), then wire escape_nl and json escape; persist.bend\n  read_all's chunk append is the\n  same pattern on a fallback path (not measured).\n- 2026-11-06 (view-all-perf): view_all on boot-speed's synthetic\n  harness-sized hub (215k events, 54k messages, 1,256 agents), boot_phases\n  bench, retired instructions. 58.1 MB, sb-core 29.1G, hub decode+load\n  5.8G -> 10.8 MB, 9.1G, 2.2G. The message bodies were ~85 % of it:\n  view_all now sends an old message that owes nothing as a cold row\n  (View.cold, a 10-item array, no text or parts; view.bend ships_whole:\n  hot, unsettled question, or one of the RECENT 256 newest go whole) and\n  the hub asks the link's msg_bodies for a body a reader needs\n  (core.rs fetch_bodies). Left: the agents, 5.1 MB of the 10.8 (archived\n  ones' briefs 2.1 MB, reports 1.2 MB, files 1.2 MB).\n- 2026-11-07 (bend-parallel): parallelism measured on Bend 2.0.39 native\n  binaries, 1 vs 8 threads, heavy-run `--low` at load 20-90:\n  `parallelism.md` (E1-E7 language rules, B1-B3 on copies of bise code).\n  vendor\u002Fjson's parallel print: 10-35 % of wall for 25-35 % more CPU on\n  28.6 MB (serial join and per-level chunk appends left); a batch parse\n  in halves 1.85x; a queued_in-shaped walk never faster forked.\n- 2026-11-07 (c4b-core-step-flat): a step's cost against the archived\n  agents, tests\u002Fcore_step_cost.py (25 live + N archived that each ran a\n  turn; retired instructions per step via proc_pid_rusage). A journal\n  replay alone hides it (no runtimes): core_profile showed 0.1 ms ticks\n  while the fake hub's loop waited ~46 % on sb-core. Four walks of every\n  agent that ever ran: V.changed diffed the marks of every runtime not at\n  rest, quadratic (tick 178M -> 0.36M at 200; land 1); rt_put appended,\n  so a live runtime sat behind every archived one (rt_put to the head;\n  land 2); every durable view carried St.order, every name (land 3, ~15M\n  of a say at 1,000); get_agent\u002Falias_of misses walked arch for the\n  user's name and for \"\" (the `from` of his says) (M.never_agent, law\n  no_reserved_names; land 4). At 1,000 archived: tick 4.5G (est.) ->\n  0.36M, sb list's step -> 0.47M, say 27.5M -> 2.7M, flat from 200.\n","# bend-perf\n\nHow to find and fix slow Bend in bise. Same results, same laws: a perf change\nnever changes what a step answers or writes.\n\n## 0. Read the language first\n\nRun `bend guide` (or `~\u002F.bend\u002Fbin\u002Fbend guide`) and read \"Recursion\",\n\"Parallelism\", \"IO and Concurrency\" and \"Under the Hood\". Look up any Base def\nwith `bend base \u003Cname>` before relying on how it evaluates. The facts this\naudit rests on:\n\n- **Bend is strict.** Every argument of a call is computed before the call.\n  `Bool.pick(c, a, b)`, `a && b`, `a || b` (`Bool.and`\u002F`Bool.or`) are plain\n  defs, so BOTH sides are computed. Only a `match` runs one branch.\n- **A `match` inspects a parameter only.** To branch lazily on a computed\n  Bool, pass it to a helper def that matches on its parameter.\n- **Strings are cons lists of chars** (`SCon{head, tail}`): `a ++ b` costs\n  the length of `a`. Building output by appending is quadratic; build a list\n  of chunks and join once (vendor\u002Fjson's join_chunks).\n- **Parallelism: read `parallelism.md` (next to this file) before you write\n  a def that walks a list or a tree.** Its rules, each measured: only a\n  parallel let `a b = f(x) g(y)` forks (two lets on two lines never do);\n  only the native build runs it in parallel (sb-core, repl-live; not the\n  JS target); two halves of equal cost (a lopsided split caps the gain);\n  a list split a few levels deep then folded, only when each item is real\n  work (a parse, a stringify: B2 1.85x; a cheap test: B3 never faster,\n  twice the CPU); an accumulator, an early exit and a serial envelope\n  block it; check with `--threads 1` vs `8` and CPU \u002F wall.\n- **`IO.fork`\u002F`IO.join`** run effects concurrently on the event loop, one\n  computation at a time: for waits (network, processes), not for CPU\n  (measured: two forked 2 s computations used 1.0 core).\n- **A hub step is sequential** (each step reads the state the previous one\n  wrote). Parallelism fits only pure bulk work inside one step or one batch.\n\n## 1. Measure (never optimise unmeasured)\n\nsb-core on a copy of a real journal (read-only, its own sb-core):\n\n    B=$(scripts\u002Fbins.sh path sb-core)\n    \u002Fusr\u002Fbin\u002Flockf -k ~\u002F.bise\u002Frun\u002Fheavy.lock nice -n 10 \\\n      python3 scripts\u002Fcore_profile.py \"$B\" ~\u002F.bise\u002Fhubs\u002F\u003Chub>\u002Fjournal.jsonl --out \"$TMPDIR\"\n\nIt prints the boot replay time, a Tick, a `say`, `view_all`, and writes three\n`sample` files. In each, the \"Sort by top of stack\" list names the hot defs as\n`WL_FID_\u003CFILE>_\u003CDEF>` (`WL_FID_MODEL_QUEUED_IN` = model.bend `queued_in`);\n`rfc_wrap`, `span_fade`, `term_drop`, `heap_alloc_miss` are the runtime's\nmemory work (many allocations: usually string building).\n\nUnder load, wall time is noise: compare **retired instructions and cycles**\n(`\u002Fusr\u002Fbin\u002Ftime -l \u003Csb-core>` around the run, or a driver that reads them),\ntwo runs each, base vs change. And read the sample for the runtime's own\nmemory work (`term_drop`, `span_fade`, `rfc_wrap`, `heap_alloc_miss`): in\nbise's Bend the cost is usually allocating and freeing (a buffer appended\nand rescanned, a parsed value dropped, a unary `Nat` fuel built then\nthrown away), more than the compares themselves.\n\nThe Rust side of a step: `SB_BENCH_JOURNAL=\u003Ccopy> cargo test -p switchboard\nbench_step -- --ignored --nocapture` (sb-core vs rust split per step).\n\nThe agent runtime (repl-live): `ps -o time` against its age, then `sample\n\u003Cpid> 5`. If it sits in poll\u002Fselect, it waits on the network: nothing to win.\n\n## 2. The patterns to look for (cheapest fix first)\n\n1. **Eager pick in a search**: `Bool.pick(c, Some{h}, find(t, k))` or\n   `eq(h) || in(t)`: the recursion runs to the end of the list even after a\n   hit. Fix: a helper that matches on the Bool and recurses only in the\n   False branch. Find them: a def whose own name appears inside a\n   `Bool.pick(`, `&&` or `||` on the same line. tests\u002Fpick_gate.py already\n   refuses the exponential case (the def called twice).\n2. **Expensive test first**: `str_in(names, to) && is_queued(st)` compares\n   strings for every message, queued or not. Match the cheap test first.\n   In a hot loop use a real helper that matches, not a thunk\n   (`LZ.and(a, u => b)`): a closure and a cons per element cost more than\n   they save (bp-lazy: thunks gave 41 -> 28 ms, the match 41 -> 10.6 ms).\n3. **Full walks per step** over everything (all messages, all agents,\n   archived included): keep the hot set apart (issue 21's split), or index it.\n4. **Appends in a loop**: `acc ++ piece` or `xs \u003C> [x]`: chunks, then one join;\n   cons then one reverse.\n5. **Pure bulk work done one by one** where the items are independent and\n   costly (parsing a batch of journal events, stringifying the view's agent\n   rows): split in balanced halves and use a parallel let. Before you\n   fork, measure the sequential envelope around it: a batch that still\n   arrives as one JSON string pays a char-by-char decode first (bp-boot,\n   2026-10-17: the outer string cost more than the whole old replay), and\n   check the sample shows more than one core busy (1.1 cores = no gain).\n   Make the per-char work cheap (pattern 1) before you split it. How to\n   shape it and what it gains: `parallelism.md`.\n\n## 3. Change it safely\n\n- One pattern per commit. The same answers: `old_core_replay.py` green, the\n  bench_byte_equal digest equal before\u002Fafter (`SB_CORE_BIN` = each build),\n  ALL PROOFS CHECK (a law may unfold the def you rewrote).\n- Before\u002Fafter numbers from core_profile.py in the commit message, same\n  journal copy, same load (under the heavy lock).\n- Bend rules from `bise-implement` hold: laws for any changed decision (a perf change changes none).\n\n## 4. Keep the record\n\nAdd a dated line to \"Audits\" below: what was measured, what changed, the\nnumbers. The next audit starts from there.\n\n## Audits\n\n- 2026-10-17 (architect, page bend-perf): his journal copy, 112,404 events.\n  Boot replay 23-30 s (JSON parse about a third, then string appends and\n  memory work); Tick 35 ms (model.bend queued_in + STRING_CMP: every message,\n  delivered ones too, compared against names); say 15 ms (answer 10.8 KB);\n  view_all 2.1 s for 30 MB (quote_string, string appends), at boot and\n  restore only. Step answers are small (tick 138 B), not the whole view.\n  34 searches in bend\u002Fhub walk the whole list (eager pick); zero parallel\n  lets or IO.fork in bend\u002F. repl-live: idle in poll (network-bound).\n- 2026-10-17 (bp-boot): the boot replay, his journal copy (112,470 events),\n  sb-core under `\u002Fusr\u002Fbin\u002Ftime -l` (retired instructions; wall time was\n  noise at load 20+). Base, batch 100: 133.3G instructions, 46.9G cycles.\n  Eager picks in vendor json's classifiers made lazy (matches on the\n  char): -1% (132.0G). The input path (main.bend read each recv'd chunk\n  by appending to the buffer and rescanning it whole): each char read once,\n  119.3G (-10%), cycles 34.7-38.5G (-18%). REPLAY_BATCH 100 -> 250: 113.7G\n  (batch 500: 112.2G; cycles flat 100-500, up past 1000). Tried and\n  dropped: a `replay_lines` link with the batch's lines parsed in parallel\n  (the outer JSON string's decode alone cost more than the old replay:\n  every quote escaped; parse_step is ~5% of the replay, the cap of any\n  parallel parse); parse's fuel as a constant (-0.8%). What is left is the\n  runtime's memory work: allocating and freeing each line, its parsed\n  Json and each event (term_drop, span_fade, rfc_wrap in the sample).\n- 2026-10-17 (bp-view, chunk 3): view_all on the same journal copy,\n  back to back in one heavy slot (load ~8): 1.92 s -> 1.13-1.25 s, bytes\n  identical (sha256 f170e123b550). vendor json: quote_string in one pass\n  (escape_onto_str), and stringify prints a JArr of 256+ items in\n  parallel halves (PItems, 6 levels) joined once: 1.92 -> 1.5 s.\n  main.bend send_line: the newline as its own send, no 30 MB append:\n  1.5 -> 1.2 s. Left, serial: join_chunks_loop's copy of the 30 MB\n  (~0.2 s) and io_cbuf's String -> bytes (~0.17 s); next step if\n  view_all matters more: answer as a list of parts, one send each.\n- 2026-10-17 (bp-lazy, chunk 1): searches stop at their hit. hub\u002Flazy.bend\n  (LZ.pick, LZ.or, LZ.and: the second side a thunk `u => f(t)`) in every\n  Maybe\u002FBool search of bend\u002Fhub and the put\u002Fset ones (the full maps,\n  rename\u002Fmark, stay maps: no law says their key is unique); queued_in\n  matches is_queued first (queued_in.keep), str_in only for a queued\n  message. Same journal copy, back to back: Tick 41.4 -> 10.6 ms (the\n  first try, LZ.and in a Bool.pick, gave 28 ms: a closure and a cons per\n  message, then dropped), say ~15.5 -> ~13.4 ms, replay 21.5 -> 17.8 s;\n  digest identical. pick_gate's third check refuses a strict search in\n  bend\u002Fhub. Left: queued_in still walks every hot message (14k on his\n  hub, term_drop is most of the 10 ms).\n- 2026-10-22 (big-msg-perf): repl-live, one 2 MB `say` on the fake\n  provider (\u002Fusr\u002Fbin\u002Ftime -l). Base 317.6e9 instructions, 53.5 s user,\n  sample: STRING_SPLIT, STRING_APPEND, term_drop under repl_conn and\n  cmd_whole: repl-core.bend appended each 4096-byte recv to the\n  unfinished line and split the whole line twice per recv. Now\n  repl-core-pure's feed keeps the line as its pieces, splits only the\n  new chunk and joins once: 25.0e9, 2.28 s user (small turn: 5.65e9,\n  0.66 s), request body sha256 identical (2 MB and small).\n  tests\u002Frepl_read_cost.py (run_all): x3.8 instructions for x4 the line,\n  x14.8 on the old path. Left (follow-up): the rest is linear, led by\n  the memory work (term_drop 213, rfc_wrap 149, span_fade 122 in the\n  2 MB after-sample), then wire escape_nl and json escape; persist.bend\n  read_all's chunk append is the\n  same pattern on a fallback path (not measured).\n- 2026-11-06 (view-all-perf): view_all on boot-speed's synthetic\n  harness-sized hub (215k events, 54k messages, 1,256 agents), boot_phases\n  bench, retired instructions. 58.1 MB, sb-core 29.1G, hub decode+load\n  5.8G -> 10.8 MB, 9.1G, 2.2G. The message bodies were ~85 % of it:\n  view_all now sends an old message that owes nothing as a cold row\n  (View.cold, a 10-item array, no text or parts; view.bend ships_whole:\n  hot, unsettled question, or one of the RECENT 256 newest go whole) and\n  the hub asks the link's msg_bodies for a body a reader needs\n  (core.rs fetch_bodies). Left: the agents, 5.1 MB of the 10.8 (archived\n  ones' briefs 2.1 MB, reports 1.2 MB, files 1.2 MB).\n- 2026-11-07 (bend-parallel): parallelism measured on Bend 2.0.39 native\n  binaries, 1 vs 8 threads, heavy-run `--low` at load 20-90:\n  `parallelism.md` (E1-E7 language rules, B1-B3 on copies of bise code).\n  vendor\u002Fjson's parallel print: 10-35 % of wall for 25-35 % more CPU on\n  28.6 MB (serial join and per-level chunk appends left); a batch parse\n  in halves 1.85x; a queued_in-shaped walk never faster forked.\n- 2026-11-07 (c4b-core-step-flat): a step's cost against the archived\n  agents, tests\u002Fcore_step_cost.py (25 live + N archived that each ran a\n  turn; retired instructions per step via proc_pid_rusage). A journal\n  replay alone hides it (no runtimes): core_profile showed 0.1 ms ticks\n  while the fake hub's loop waited ~46 % on sb-core. Four walks of every\n  agent that ever ran: V.changed diffed the marks of every runtime not at\n  rest, quadratic (tick 178M -> 0.36M at 200; land 1); rt_put appended,\n  so a live runtime sat behind every archived one (rt_put to the head;\n  land 2); every durable view carried St.order, every name (land 3, ~15M\n  of a say at 1,000); get_agent\u002Falias_of misses walked arch for the\n  user's name and for \"\" (the `from` of his says) (M.never_agent, law\n  no_reserved_names; land 4). At 1,000 archived: tick 4.5G (est.) ->\n  0.36M, sb list's step -> 0.47M, say 27.5M -> 2.7M, flat from 200.\n",{"name":5,"description":7},"main","7c09ce329eff2caff1dc3e4d44dfd6c236a282ce",".agents\u002Fskills\u002Fbend-perf",9,"https:\u002F\u002Fgithub.com\u002Fgvergnaud\u002Fbise","https:\u002F\u002Fbise.dev","https:\u002F\u002Fgithub.com\u002Fgvergnaud","https:\u002F\u002Ftype-level-typescript.com","Building agents at Mistral — Author of bise, type-level-typescript.com, TS-Pattern, HOTScript...","2026-11-15 04:07:17",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add gvergnaud\u002Fbise --skill bend-perf",{"tool":40,"command":41},"bunx","bunx skills add gvergnaud\u002Fbise --skill bend-perf",{"tool":43,"command":44},"pnpm","pnpm dlx skills add gvergnaud\u002Fbise --skill bend-perf","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgvergnaud\u002Fbise\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fbend-perf\u002FSKILL.md",true,[48],{"path":49,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":52,"sourceHtmlUrl":53},"parallelism.md","REFERENCE","参考文档",5470,"https:\u002F\u002Fgithub.com\u002Fgvergnaud\u002Fbise\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fbend-perf\u002Fparallelism.md",[55,62,69,76,83,89],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":19},"01M7DDF53D28NXA17HZP08094A","greet","Greet someone the hello-plugin way. Use when asked for a hello-plugin greeting.","https:\u002F\u002Fgithub.com\u002Fgvergnaud\u002Fbise\u002Fblob\u002Fmain\u002Frust\u002Fplugins\u002Ftests\u002Ffixtures\u002Fhello-plugin\u002Fskills\u002Fgreet\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":19},"01M7DDF3V0J5P7VEWAS7NM458P","triage","triage Linear issues","https:\u002F\u002Fgithub.com\u002Fgvergnaud\u002Fbise\u002Fblob\u002Fmain\u002Frust\u002Fplugins\u002Ftests\u002Ffixtures\u002Fadd\u002Fcodex-linear\u002Fin\u002Fskills\u002Ftriage\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M7DDF1EPY3GMFG4WG368B3Q8","jot","jot a note","https:\u002F\u002Fgithub.com\u002Fgvergnaud\u002Fbise\u002Fblob\u002Fmain\u002Frust\u002Fplugins\u002Ftests\u002Ffixtures\u002Fadd\u002Fclaude-notes\u002Fin\u002Fskills\u002Fjot\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M7DDETP44AE35MSDENY1THS9","bise-demo","Run bise's built-in demo, a short role-play where a small product team (a pm, a designer, a dev) starts, talks like colleagues, asks the user one question and one agent is dropped, with no file or git change. Use when the user asks to see what bise or you can do, for a demo, a tour or your features (show me what you can do, give me a demo, what can you do?, demo all your features), in any language.","https:\u002F\u002Fgithub.com\u002Fgvergnaud\u002Fbise\u002Fblob\u002Fmain\u002Fprompts\u002Fskills\u002Fbise-demo\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M7DDERQ5JJHVR314X762FD5K","bise-pages","https:\u002F\u002Fgithub.com\u002Fgvergnaud\u002Fbise\u002Fblob\u002Fmain\u002Fprompts\u002Fskills-all\u002Fbise-pages\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":19},"01M7DDEMV9FHB1HTNWY9W5RXAZ","slides","Make, read or edit a PowerPoint deck (.pptx) - a review, a pitch, a status deck, slides with tables and charts - with a TypeScript script run by `bise office run`. Use when the user asks for slides, a deck or a pptx, sends one, or leaves notes on a pptx artifact.","https:\u002F\u002Fgithub.com\u002Fgvergnaud\u002Fbise\u002Fblob\u002Fmain\u002Fplugins\u002Fslides\u002Fskills\u002Fslides\u002FSKILL.md",[],[]]