docs(performance): specify round P11, the counted for over a flat list #416
Loading…
Reference in a new issue
No description provided.
Delete branch "loop/415-p11-counted-for-spec"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #415
Step 1 of epic #58 (P11). Documentation only: nothing in
compiler/,std/,runtime/orseed/changes.docs/PERFORMANCE.mdgets section 5.1 "What P11 builds" with decisions 1 to 6, each with its reason:ir/counted.trb, wired infinishLoweringbetweenrewriteElementPlacesanddropProvableChecks; not a branch oflowerForIterate, which runs before the devirtualization and cannot tell the lists apart.ListIterator,TrieListIterator(std/collections) andBufferIterator(std/core), matched by shape: the sameget/index + 1twenty lines over the IR typeRuntime(ListStorage, Item). Everything else keeps itsOption.lengthonce, a counter, an uncheckedElementread; the increment sits at the top of the body socontinueandbreakkeep their edges. Why no bounds panic can occur, and a sentence each forbreak,continue, tuple pattern, counted item, empty list.torb_list_item) and the VM (ListItemAddress) execute, and the VM condition.list-iterateratio at most 10% abovelist-indexof the same run, allocations stay 24; did not help = time above two thirds of themaintime in the same run. Before numbers are section 4's.Also: the P11 row names the real files, the status line and the "after the VM" paragraph are updated (the VM exists; P11 still waits for its implementing step), and finding 5's "what is left" and the zero-cost row link the subsection. The step 2 outline is two commits with a cut by cursor.
Where the code differs from the issue's starting decisions (corrected in the record):
ConsStackandBankersQueueare aStackand aQueue, not aList, and have their own cursors; the risk of a quadratic loop is a userList, andRingList(iterates through a pipeline over a range).TrieListis anative typeof its own with its ownTrieListIterator, not an alias at the type level; it is the same IR type (ListStorage), so it qualifies.BufferIteratorqualifies too.list-iterateis a benchmark, not a conformance program, so its allocation check is the--allocationscolumn ofbenchmarks/run.sh, not an.allocationsfile.ir/bounds.trbdoes not apply tolist-index(its limit is a constant, notlength()), which is why 13.25x is still the right reference.Buffer-window cursor; the record says step 2 re-reads the cursor shape if it lands first.Seen, not changed (out of scope): finding 5 says
torb_list_getis cross-unit, but it isstatic inlineintorb.h; the paragraph "What is left of P8" still says the bounds check is missing while finding 8 andir/bounds.trbhave it; the F5 excerpt names..._ArrayList_iterator__...where the member isiterate. Step 2 re-reads all three fromtorb ir.Test:
python3 tools/pdisc/scripts/pdisc.py checkok,tools/check-commits.sh origin/mainok. Not run locally:torb docs check docs,torb docs index --check docs,torb docs skill docs skills --check(no torb binary in the sandbox); forge CI runs them.skills/does not mirror PERFORMANCE.md.forover a flat list in PERFORMANCE.md (step 1 of #58) #415Approved. Checklist for head
b5ab08b:docs/PERFORMANCE.md, exactly the acceptance criteria of #415 (section 5.1 with decisions 1-6, P11 row, F5 "what is left" and zero-cost row links, status line, "after the VM" sentence). Nothing incompiler/,std/,runtime/,seed/.finishLoweringrunsdevirtualizeProgram,rewriteElementPlaces,dropProvableChecks,dropUncalledMembersin the order the record relies on.ir/elements.trb,ir/bounds.trbandtests/conformance/list-bounds-proven.trbexist.ir/counted.trbis correctly described as new. Deviations from the issue (ConsStack/BankersQueue, TrieList, benchmark vs conformance allocations) are stated openly.Non-blocking: none.