Routing loop: keep flows in typed-array columns instead of objects, and add up link and transit totals without boxing numbers
Flows are packed into Float64Array/Int32Array columns; R.fl builds the old objects only when read. Edge egress sums keep a slot per egress in a plain array, and R.tNet is added up in a typed array and written out at the end, in the same key order. Results are identical to main.
This commit is contained in:
parent
0355eb4e38
commit
89fc8b8d03
3 changed files with 73 additions and 57 deletions
|
|
@ -23,7 +23,7 @@ function network(ev) {
|
|||
// Share the model and path sender, but replace indexed exit selection with
|
||||
// the original full scan and stable sort for every flow.
|
||||
const source = ev('compute.toString()');
|
||||
const start = source.indexOf(' for(const pass of PASSES||[null])for(const rank of RANKS){');
|
||||
const start = source.indexOf(' for(const pass of PASSES)for(const rank of RANKS){');
|
||||
const end = source.indexOf(' for(const i of NORD)', start);
|
||||
assert.ok(start >= 0 && end > start, 'allocation loop boundaries must exist');
|
||||
ev(`window.referenceCompute=eval('('+${JSON.stringify(source.slice(0,start)+referenceAllocation+source.slice(end))}+')')`);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue