diff --git a/compiler/transf.nim b/compiler/transf.nim index 59e4453fd7..5cf43e6a3f 100644 --- a/compiler/transf.nim +++ b/compiler/transf.nim @@ -366,6 +366,19 @@ proc transformAsgn(c: PTransf, n: PNode): PNode = result[0] = letSection result[1] = asgnNode +template assignTupleUnpacking(c: PTransf, e: PNode) = + for i in 0.. 50 and value < 200: + otherContainer.add count + + innerTestTotalMem() + +proc main = + let closureMem = testTotalMem(myPairsClosure) #1052672 + let inlineMem = testTotalMem(myPairsInline) #20328448 + + when defined(echoFootprint): + echo "Closure memory footprint: " & $closureMem + echo "Inline memory footprint: " & $inlineMem + + # check that mem footprint is relatively similar b/t each method + doAssert (closureMem - inlineMem).abs < (closureMem div 10) + +main() \ No newline at end of file