{"owner":"scinfu","repo":"SwiftSoup","hasSkills":true,"totalSkillsCount":1,"totalTokensCount":1213,"categories":["root-instruction"],"hasMcp":false,"mcpConfig":null,"found":["AGENTS.md"],"skills":{"AGENTS.md":"# Benchmarking & profiling protocol (SwiftSoup)\n\nThis repo’s current performance harness is the `BenchmarkProfileTest/testParseBenchmarkProfile` test. It is driven by\nenvironment variables and runs in a release test build.\n\n## Optional mise shortcuts (macOS/Linux)\nThe tasks use your existing Swift toolchain and do not install tools:\n```\nmise run test:release\nmise run bench\nSWIFTSOUP_BENCHMARK_ITERATIONS=100 mise run bench\nSWIFTSOUP_BENCHMARK_SET=attribute-heavy mise run bench\n```\n`bench` defaults to `base,large`, two in-process warmups, and ten measured iterations.\nExisting `SWIFTSOUP_BENCHMARK_*` environment overrides are preserved. Increase the\niteration count for measurements; these modest defaults are only a starting point.\nThe direct SwiftPM commands below remain supported without mise.\n\nCompare the benchmark's elapsed-time line, not build or task wall time. The default\nworkload includes Data and String parsing plus selector/text operations; it is not a\nparse-only measurement. Record `swift --version` and any local source changes with\nresults. Repeat runs with alternating baseline/candidate order, run an unchanged\nA/A comparison to estimate noise, and validate behavior with regression tests before\ninterpreting an improvement. Keep profiling runs separate from timing runs.\n\n## A/B comparison rules\n- Always compare release builds on the same machine.\n- If an optimization has a flag: run OFF vs ON.\n- If no flag: compare HEAD to a baseline commit in a worktree.\n- Test each optimization in isolation before any combined run.\n- Record commit SHAs, flags, iterations, and the exact command lines used.\n\n## Common benchmark knobs (env vars)\n- `SWIFTSOUP_BENCHMARK=1` (enable the benchmark test)\n- `SWIFTSOUP_BENCHMARK_SET=...` (comma-separated workload sets)\n- `SWIFTSOUP_BENCHMARK_WARMUP=2`\n- `SWIFTSOUP_BENCHMARK_ITERATIONS=500`\n- `SWIFTSOUP_BENCHMARK_ITERATIONS_MULTIPLIER=1`\n- `SWIFTSOUP_BENCHMARK_REPEAT=200` (base set)\n- `SWIFTSOUP_BENCHMARK_LARGE_REPEAT=60` (large set)\n- `SWIFTSOUP_BENCHMARK_SELECTOR_REPEAT=1`\n- `SWIFTSOUP_BENCHMARK_SELECTOR_STRESS_REPEAT=1`\n- `SWIFTSOUP_BENCHMARK_ATTRIBUTE_SELECTOR_STRESS_REPEAT=1`\n- `SWIFTSOUP_BENCHMARK_SERIALIZER=source-patched|without-source-reuse|reuse-source-outside-body`\n- `SWIFTSOUP_BENCHMARK_DENSE_BODY_MUTATIONS=1`\n\n## Regression suite (broad coverage)\nRun in both baseline and current (exact command line):\n```\nSWIFTSOUP_BENCHMARK=1 \\\nSWIFTSOUP_BENCHMARK_SET=base,large \\\nSWIFTSOUP_BENCHMARK_REPEAT=200 \\\nSWIFTSOUP_BENCHMARK_LARGE_REPEAT=60 \\\nSWIFTSOUP_BENCHMARK_WARMUP=2 \\\nSWIFTSOUP_BENCHMARK_ITERATIONS=500 \\\nSWIFTSOUP_BENCHMARK_ITERATIONS_MULTIPLIER=1 \\\nSWIFTSOUP_BENCHMARK_SELECTOR_REPEAT=1 \\\nSWIFTSOUP_BENCHMARK_SELECTOR_STRESS_REPEAT=1 \\\nSWIFTSOUP_BENCHMARK_ATTRIBUTE_SELECTOR_STRESS_REPEAT=1 \\\nswift test -c release --filter BenchmarkProfileTest/testParseBenchmarkProfile\n```\n\n## Targeted suite (optimization-specific)\nPick the workload set that stresses the change and run with the same flags:\n```\nSWIFTSOUP_BENCHMARK=1 \\\nSWIFTSOUP_BENCHMARK_SET=attribute-heavy,attribute-mega,attribute-storm,data-heavy,data-storm,tag-heavy,custom-tag,dense-text,querystring \\\nSWIFTSOUP_BENCHMARK_WARMUP=2 \\\nSWIFTSOUP_BENCHMARK_ITERATIONS=500 \\\nSWIFTSOUP_BENCHMARK_ITERATIONS_MULTIPLIER=1 \\\nSWIFTSOUP_BENCHMARK_SELECTOR_REPEAT=1 \\\nSWIFTSOUP_BENCHMARK_SELECTOR_STRESS_REPEAT=1 \\\nSWIFTSOUP_BENCHMARK_ATTRIBUTE_SELECTOR_STRESS_REPEAT=1 \\\nswift test -c release --filter BenchmarkProfileTest/testParseBenchmarkProfile\n```\n\n## Serializer A/B\nFor Reader-style dense body mutation, run the same release benchmark once per serializer:\n```\nfor serializer in source-patched without-source-reuse reuse-source-outside-body; do\n  SWIFTSOUP_BENCHMARK=1 \\\n  SWIFTSOUP_BENCHMARK_SET=manabi-reader \\\n  SWIFTSOUP_BENCHMARK_MANABI_REPEAT=40 \\\n  SWIFTSOUP_BENCHMARK_WARMUP=2 \\\n  SWIFTSOUP_BENCHMARK_ITERATIONS=30 \\\n  SWIFTSOUP_BENCHMARK_ITERATIONS_MULTIPLIER=1 \\\n  SWIFTSOUP_BENCHMARK_SKIP_SELECTORS=1 \\\n  SWIFTSOUP_BENCHMARK_SKIP_TEXT=1 \\\n  SWIFTSOUP_BENCHMARK_DENSE_BODY_MUTATIONS=1 \\\n  SWIFTSOUP_BENCHMARK_SERIALIZER=\"$serializer\" \\\n  swift test -c release --filter BenchmarkProfileTest/testParseBenchmarkProfile\ndone\n```\n\n## Baseline worktree helper\n- `git worktree add ../SwiftSoup-bench-base <baseline-commit>`\n- Run the same commands in both trees; compare the “Benchmark elapsed: … ms over N iterations” line.\n- Use `git rev-parse HEAD` to log the commit for each side.\n\n## Profiling\n- Use Instruments (Time Profiler) on the `SwiftSoupPackageTests.xctest` process while running the same benchmark test\n  filter and env vars.\n- Always profile release builds and keep the workload set identical to the benchmark run you are comparing against.\n"},"files":{"AGENTS.md":"# Benchmarking & profiling protocol (SwiftSoup)\n\nThis repo’s current performance harness is the `BenchmarkProfileTest/testParseBenchmarkProfile` test. It is driven by\nenvironment variables and runs in a release test build.\n\n## Optional mise shortcuts (macOS/Linux)\nThe tasks use your existing Swift toolchain and do not install tools:\n```\nmise run test:release\nmise run bench\nSWIFTSOUP_BENCHMARK_ITERATIONS=100 mise run bench\nSWIFTSOUP_BENCHMARK_SET=attribute-heavy mise run bench\n```\n`bench` defaults to `base,large`, two in-process warmups, and ten measured iterations.\nExisting `SWIFTSOUP_BENCHMARK_*` environment overrides are preserved. Increase the\niteration count for measurements; these modest defaults are only a starting point.\nThe direct SwiftPM commands below remain supported without mise.\n\nCompare the benchmark's elapsed-time line, not build or task wall time. The default\nworkload includes Data and String parsing plus selector/text operations; it is not a\nparse-only measurement. Record `swift --version` and any local source changes with\nresults. Repeat runs with alternating baseline/candidate order, run an unchanged\nA/A comparison to estimate noise, and validate behavior with regression tests before\ninterpreting an improvement. Keep profiling runs separate from timing runs.\n\n## A/B comparison rules\n- Always compare release builds on the same machine.\n- If an optimization has a flag: run OFF vs ON.\n- If no flag: compare HEAD to a baseline commit in a worktree.\n- Test each optimization in isolation before any combined run.\n- Record commit SHAs, flags, iterations, and the exact command lines used.\n\n## Common benchmark knobs (env vars)\n- `SWIFTSOUP_BENCHMARK=1` (enable the benchmark test)\n- `SWIFTSOUP_BENCHMARK_SET=...` (comma-separated workload sets)\n- `SWIFTSOUP_BENCHMARK_WARMUP=2`\n- `SWIFTSOUP_BENCHMARK_ITERATIONS=500`\n- `SWIFTSOUP_BENCHMARK_ITERATIONS_MULTIPLIER=1`\n- `SWIFTSOUP_BENCHMARK_REPEAT=200` (base set)\n- `SWIFTSOUP_BENCHMARK_LARGE_REPEAT=60` (large set)\n- `SWIFTSOUP_BENCHMARK_SELECTOR_REPEAT=1`\n- `SWIFTSOUP_BENCHMARK_SELECTOR_STRESS_REPEAT=1`\n- `SWIFTSOUP_BENCHMARK_ATTRIBUTE_SELECTOR_STRESS_REPEAT=1`\n- `SWIFTSOUP_BENCHMARK_SERIALIZER=source-patched|without-source-reuse|reuse-source-outside-body`\n- `SWIFTSOUP_BENCHMARK_DENSE_BODY_MUTATIONS=1`\n\n## Regression suite (broad coverage)\nRun in both baseline and current (exact command line):\n```\nSWIFTSOUP_BENCHMARK=1 \\\nSWIFTSOUP_BENCHMARK_SET=base,large \\\nSWIFTSOUP_BENCHMARK_REPEAT=200 \\\nSWIFTSOUP_BENCHMARK_LARGE_REPEAT=60 \\\nSWIFTSOUP_BENCHMARK_WARMUP=2 \\\nSWIFTSOUP_BENCHMARK_ITERATIONS=500 \\\nSWIFTSOUP_BENCHMARK_ITERATIONS_MULTIPLIER=1 \\\nSWIFTSOUP_BENCHMARK_SELECTOR_REPEAT=1 \\\nSWIFTSOUP_BENCHMARK_SELECTOR_STRESS_REPEAT=1 \\\nSWIFTSOUP_BENCHMARK_ATTRIBUTE_SELECTOR_STRESS_REPEAT=1 \\\nswift test -c release --filter BenchmarkProfileTest/testParseBenchmarkProfile\n```\n\n## Targeted suite (optimization-specific)\nPick the workload set that stresses the change and run with the same flags:\n```\nSWIFTSOUP_BENCHMARK=1 \\\nSWIFTSOUP_BENCHMARK_SET=attribute-heavy,attribute-mega,attribute-storm,data-heavy,data-storm,tag-heavy,custom-tag,dense-text,querystring \\\nSWIFTSOUP_BENCHMARK_WARMUP=2 \\\nSWIFTSOUP_BENCHMARK_ITERATIONS=500 \\\nSWIFTSOUP_BENCHMARK_ITERATIONS_MULTIPLIER=1 \\\nSWIFTSOUP_BENCHMARK_SELECTOR_REPEAT=1 \\\nSWIFTSOUP_BENCHMARK_SELECTOR_STRESS_REPEAT=1 \\\nSWIFTSOUP_BENCHMARK_ATTRIBUTE_SELECTOR_STRESS_REPEAT=1 \\\nswift test -c release --filter BenchmarkProfileTest/testParseBenchmarkProfile\n```\n\n## Serializer A/B\nFor Reader-style dense body mutation, run the same release benchmark once per serializer:\n```\nfor serializer in source-patched without-source-reuse reuse-source-outside-body; do\n  SWIFTSOUP_BENCHMARK=1 \\\n  SWIFTSOUP_BENCHMARK_SET=manabi-reader \\\n  SWIFTSOUP_BENCHMARK_MANABI_REPEAT=40 \\\n  SWIFTSOUP_BENCHMARK_WARMUP=2 \\\n  SWIFTSOUP_BENCHMARK_ITERATIONS=30 \\\n  SWIFTSOUP_BENCHMARK_ITERATIONS_MULTIPLIER=1 \\\n  SWIFTSOUP_BENCHMARK_SKIP_SELECTORS=1 \\\n  SWIFTSOUP_BENCHMARK_SKIP_TEXT=1 \\\n  SWIFTSOUP_BENCHMARK_DENSE_BODY_MUTATIONS=1 \\\n  SWIFTSOUP_BENCHMARK_SERIALIZER=\"$serializer\" \\\n  swift test -c release --filter BenchmarkProfileTest/testParseBenchmarkProfile\ndone\n```\n\n## Baseline worktree helper\n- `git worktree add ../SwiftSoup-bench-base <baseline-commit>`\n- Run the same commands in both trees; compare the “Benchmark elapsed: … ms over N iterations” line.\n- Use `git rev-parse HEAD` to log the commit for each side.\n\n## Profiling\n- Use Instruments (Time Profiler) on the `SwiftSoupPackageTests.xctest` process while running the same benchmark test\n  filter and env vars.\n- Always profile release builds and keep the workload set identical to the benchmark run you are comparing against.\n"},"items":[{"name":"AGENTS.md","path":"AGENTS.md","rawUrl":"https://raw.githubusercontent.com/scinfu/SwiftSoup/HEAD/AGENTS.md","title":"AI Agent Protocol & Instructions","category":"root-instruction","format":"markdown","content":"# Benchmarking & profiling protocol (SwiftSoup)\n\nThis repo’s current performance harness is the `BenchmarkProfileTest/testParseBenchmarkProfile` test. It is driven by\nenvironment variables and runs in a release test build.\n\n## Optional mise shortcuts (macOS/Linux)\nThe tasks use your existing Swift toolchain and do not install tools:\n```\nmise run test:release\nmise run bench\nSWIFTSOUP_BENCHMARK_ITERATIONS=100 mise run bench\nSWIFTSOUP_BENCHMARK_SET=attribute-heavy mise run bench\n```\n`bench` defaults to `base,large`, two in-process warmups, and ten measured iterations.\nExisting `SWIFTSOUP_BENCHMARK_*` environment overrides are preserved. Increase the\niteration count for measurements; these modest defaults are only a starting point.\nThe direct SwiftPM commands below remain supported without mise.\n\nCompare the benchmark's elapsed-time line, not build or task wall time. The default\nworkload includes Data and String parsing plus selector/text operations; it is not a\nparse-only measurement. Record `swift --version` and any local source changes with\nresults. Repeat runs with alternating baseline/candidate order, run an unchanged\nA/A comparison to estimate noise, and validate behavior with regression tests before\ninterpreting an improvement. Keep profiling runs separate from timing runs.\n\n## A/B comparison rules\n- Always compare release builds on the same machine.\n- If an optimization has a flag: run OFF vs ON.\n- If no flag: compare HEAD to a baseline commit in a worktree.\n- Test each optimization in isolation before any combined run.\n- Record commit SHAs, flags, iterations, and the exact command lines used.\n\n## Common benchmark knobs (env vars)\n- `SWIFTSOUP_BENCHMARK=1` (enable the benchmark test)\n- `SWIFTSOUP_BENCHMARK_SET=...` (comma-separated workload sets)\n- `SWIFTSOUP_BENCHMARK_WARMUP=2`\n- `SWIFTSOUP_BENCHMARK_ITERATIONS=500`\n- `SWIFTSOUP_BENCHMARK_ITERATIONS_MULTIPLIER=1`\n- `SWIFTSOUP_BENCHMARK_REPEAT=200` (base set)\n- `SWIFTSOUP_BENCHMARK_LARGE_REPEAT=60` (large set)\n- `SWIFTSOUP_BENCHMARK_SELECTOR_REPEAT=1`\n- `SWIFTSOUP_BENCHMARK_SELECTOR_STRESS_REPEAT=1`\n- `SWIFTSOUP_BENCHMARK_ATTRIBUTE_SELECTOR_STRESS_REPEAT=1`\n- `SWIFTSOUP_BENCHMARK_SERIALIZER=source-patched|without-source-reuse|reuse-source-outside-body`\n- `SWIFTSOUP_BENCHMARK_DENSE_BODY_MUTATIONS=1`\n\n## Regression suite (broad coverage)\nRun in both baseline and current (exact command line):\n```\nSWIFTSOUP_BENCHMARK=1 \\\nSWIFTSOUP_BENCHMARK_SET=base,large \\\nSWIFTSOUP_BENCHMARK_REPEAT=200 \\\nSWIFTSOUP_BENCHMARK_LARGE_REPEAT=60 \\\nSWIFTSOUP_BENCHMARK_WARMUP=2 \\\nSWIFTSOUP_BENCHMARK_ITERATIONS=500 \\\nSWIFTSOUP_BENCHMARK_ITERATIONS_MULTIPLIER=1 \\\nSWIFTSOUP_BENCHMARK_SELECTOR_REPEAT=1 \\\nSWIFTSOUP_BENCHMARK_SELECTOR_STRESS_REPEAT=1 \\\nSWIFTSOUP_BENCHMARK_ATTRIBUTE_SELECTOR_STRESS_REPEAT=1 \\\nswift test -c release --filter BenchmarkProfileTest/testParseBenchmarkProfile\n```\n\n## Targeted suite (optimization-specific)\nPick the workload set that stresses the change and run with the same flags:\n```\nSWIFTSOUP_BENCHMARK=1 \\\nSWIFTSOUP_BENCHMARK_SET=attribute-heavy,attribute-mega,attribute-storm,data-heavy,data-storm,tag-heavy,custom-tag,dense-text,querystring \\\nSWIFTSOUP_BENCHMARK_WARMUP=2 \\\nSWIFTSOUP_BENCHMARK_ITERATIONS=500 \\\nSWIFTSOUP_BENCHMARK_ITERATIONS_MULTIPLIER=1 \\\nSWIFTSOUP_BENCHMARK_SELECTOR_REPEAT=1 \\\nSWIFTSOUP_BENCHMARK_SELECTOR_STRESS_REPEAT=1 \\\nSWIFTSOUP_BENCHMARK_ATTRIBUTE_SELECTOR_STRESS_REPEAT=1 \\\nswift test -c release --filter BenchmarkProfileTest/testParseBenchmarkProfile\n```\n\n## Serializer A/B\nFor Reader-style dense body mutation, run the same release benchmark once per serializer:\n```\nfor serializer in source-patched without-source-reuse reuse-source-outside-body; do\n  SWIFTSOUP_BENCHMARK=1 \\\n  SWIFTSOUP_BENCHMARK_SET=manabi-reader \\\n  SWIFTSOUP_BENCHMARK_MANABI_REPEAT=40 \\\n  SWIFTSOUP_BENCHMARK_WARMUP=2 \\\n  SWIFTSOUP_BENCHMARK_ITERATIONS=30 \\\n  SWIFTSOUP_BENCHMARK_ITERATIONS_MULTIPLIER=1 \\\n  SWIFTSOUP_BENCHMARK_SKIP_SELECTORS=1 \\\n  SWIFTSOUP_BENCHMARK_SKIP_TEXT=1 \\\n  SWIFTSOUP_BENCHMARK_DENSE_BODY_MUTATIONS=1 \\\n  SWIFTSOUP_BENCHMARK_SERIALIZER=\"$serializer\" \\\n  swift test -c release --filter BenchmarkProfileTest/testParseBenchmarkProfile\ndone\n```\n\n## Baseline worktree helper\n- `git worktree add ../SwiftSoup-bench-base <baseline-commit>`\n- Run the same commands in both trees; compare the “Benchmark elapsed: … ms over N iterations” line.\n- Use `git rev-parse HEAD` to log the commit for each side.\n\n## Profiling\n- Use Instruments (Time Profiler) on the `SwiftSoupPackageTests.xctest` process while running the same benchmark test\n  filter and env vars.\n- Always profile release builds and keep the workload set identical to the benchmark run you are comparing against.\n","isInternal":false,"tokens":1213,"sizeBytes":4707}],"systemPromptSnippet":"<yakaai_skills repo=\"scinfu/SwiftSoup\">\n<!-- File: AGENTS.md (Tokens: ~1213 | Category: root-instruction) -->\n# Benchmarking & profiling protocol (SwiftSoup)\n\nThis repo’s current performance harness is the `BenchmarkProfileTest/testParseBenchmarkProfile` test. It is driven by\nenvironment variables and runs in a release test build.\n\n## Optional mise shortcuts (macOS/Linux)\nThe tasks use your existing Swift toolchain and do not install tools:\n```\nmise run test:release\nmise run bench\nSWIFTSOUP_BENCHMARK_ITERATIONS=100 mise run bench\nSWIFTSOUP_BENCHMARK_SET=attribute-heavy mise run bench\n```\n`bench` defaults to `base,large`, two in-process warmups, and ten measured iterations.\nExisting `SWIFTSOUP_BENCHMARK_*` environment overrides are preserved. Increase the\niteration count for measurements; these modest defaults are only a starting point.\nThe direct SwiftPM commands below remain supported without mise.\n\nCompare the benchmark's elapsed-time line, not build or task wall time. The default\nworkload includes Data and String parsing plus selector/text operations; it is not a\nparse-only measurement. Record `swift --version` and any local source changes with\nresults. Repeat runs with alternating baseline/candidate order, run an unchanged\nA/A comparison to estimate noise, and validate behavior with regression tests before\ninterpreting an improvement. Keep profiling runs separate from timing runs.\n\n## A/B comparison rules\n- Always compare release builds on the same machine.\n- If an optimization has a flag: run OFF vs ON.\n- If no flag: compare HEAD to a baseline commit in a worktree.\n- Test each optimization in isolation before any combined run.\n- Record commit SHAs, flags, iterations, and the exact command lines used.\n\n## Common benchmark knobs (env vars)\n- `SWIFTSOUP_BENCHMARK=1` (enable the benchmark test)\n- `SWIFTSOUP_BENCHMARK_SET=...` (comma-separated workload sets)\n- `SWIFTSOUP_BENCHMARK_WARMUP=2`\n- `SWIFTSOUP_BENCHMARK_ITERATIONS=500`\n- `SWIFTSOUP_BENCHMARK_ITERATIONS_MULTIPLIER=1`\n- `SWIFTSOUP_BENCHMARK_REPEAT=200` (base set)\n- `SWIFTSOUP_BENCHMARK_LARGE_REPEAT=60` (large set)\n- `SWIFTSOUP_BENCHMARK_SELECTOR_REPEAT=1`\n- `SWIFTSOUP_BENCHMARK_SELECTOR_STRESS_REPEAT=1`\n- `SWIFTSOUP_BENCHMARK_ATTRIBUTE_SELECTOR_STRESS_REPEAT=1`\n- `SWIFTSOUP_BENCHMARK_SERIALIZER=source-patched|without-source-reuse|reuse-source-outside-body`\n- `SWIFTSOUP_BENCHMARK_DENSE_BODY_MUTATIONS=1`\n\n## Regression suite (broad coverage)\nRun in both baseline and current (exact command line):\n```\nSWIFTSOUP_BENCHMARK=1 \\\nSWIFTSOUP_BENCHMARK_SET=base,large \\\nSWIFTSOUP_BENCHMARK_REPEAT=200 \\\nSWIFTSOUP_BENCHMARK_LARGE_REPEAT=60 \\\nSWIFTSOUP_BENCHMARK_WARMUP=2 \\\nSWIFTSOUP_BENCHMARK_ITERATIONS=500 \\\nSWIFTSOUP_BENCHMARK_ITERATIONS_MULTIPLIER=1 \\\nSWIFTSOUP_BENCHMARK_SELECTOR_REPEAT=1 \\\nSWIFTSOUP_BENCHMARK_SELECTOR_STRESS_REPEAT=1 \\\nSWIFTSOUP_BENCHMARK_ATTRIBUTE_SELECTOR_STRESS_REPEAT=1 \\\nswift test -c release --filter BenchmarkProfileTest/testParseBenchmarkProfile\n```\n\n## Targeted suite (optimization-specific)\nPick the workload set that stresses the change and run with the same flags:\n```\nSWIFTSOUP_BENCHMARK=1 \\\nSWIFTSOUP_BENCHMARK_SET=attribute-heavy,attribute-mega,attribute-storm,data-heavy,data-storm,tag-heavy,custom-tag,dense-text,querystring \\\nSWIFTSOUP_BENCHMARK_WARMUP=2 \\\nSWIFTSOUP_BENCHMARK_ITERATIONS=500 \\\nSWIFTSOUP_BENCHMARK_ITERATIONS_MULTIPLIER=1 \\\nSWIFTSOUP_BENCHMARK_SELECTOR_REPEAT=1 \\\nSWIFTSOUP_BENCHMARK_SELECTOR_STRESS_REPEAT=1 \\\nSWIFTSOUP_BENCHMARK_ATTRIBUTE_SELECTOR_STRESS_REPEAT=1 \\\nswift test -c release --filter BenchmarkProfileTest/testParseBenchmarkProfile\n```\n\n## Serializer A/B\nFor Reader-style dense body mutation, run the same release benchmark once per serializer:\n```\nfor serializer in source-patched without-source-reuse reuse-source-outside-body; do\n  SWIFTSOUP_BENCHMARK=1 \\\n  SWIFTSOUP_BENCHMARK_SET=manabi-reader \\\n  SWIFTSOUP_BENCHMARK_MANABI_REPEAT=40 \\\n  SWIFTSOUP_BENCHMARK_WARMUP=2 \\\n  SWIFTSOUP_BENCHMARK_ITERATIONS=30 \\\n  SWIFTSOUP_BENCHMARK_ITERATIONS_MULTIPLIER=1 \\\n  SWIFTSOUP_BENCHMARK_SKIP_SELECTORS=1 \\\n  SWIFTSOUP_BENCHMARK_SKIP_TEXT=1 \\\n  SWIFTSOUP_BENCHMARK_DENSE_BODY_MUTATIONS=1 \\\n  SWIFTSOUP_BENCHMARK_SERIALIZER=\"$serializer\" \\\n  swift test -c release --filter BenchmarkProfileTest/testParseBenchmarkProfile\ndone\n```\n\n## Baseline worktree helper\n- `git worktree add ../SwiftSoup-bench-base <baseline-commit>`\n- Run the same commands in both trees; compare the “Benchmark elapsed: … ms over N iterations” line.\n- Use `git rev-parse HEAD` to log the commit for each side.\n\n## Profiling\n- Use Instruments (Time Profiler) on the `SwiftSoupPackageTests.xctest` process while running the same benchmark test\n  filter and env vars.\n- Always profile release builds and keep the workload set identical to the benchmark run you are comparing against.\n</yakaai_skills>"}