Open seveibar opened 1 month ago
The current implementation of for-of in porffor duplicates code. Nested for-of loops (which appear in the benchmark) make this much worse and causes more instructions to generate than it can handle. The crash here in particular is because porffor uses array.push(...values);
to push values into an array, which breaks with too many parameters.
File: https://github.com/tscircuit/autorouting/blob/main/algos/algorithm-template-ts/benchmark.ts
Compiled with
bun build ./benchmark.ts
Run with
porf --module ./benchmark.js