feat: dynamically grow fiber call frame array instead of fixed MAX_CALL_FRAMES
Replace the statically-sized CallFrame array in ObjFiber with a dynamically allocated array that starts at INITIAL_CALL_FRAMES (4) and doubles when capacity is exceeded. This reduces memory for new fibers and improves fiber creation benchmark performance by ~45%.
This commit is contained in:
@@ -67,6 +67,8 @@ BENCHMARK("fib", r"""317811
|
||||
317811
|
||||
317811""")
|
||||
|
||||
BENCHMARK("fibers", r"""4999950000""")
|
||||
|
||||
BENCHMARK("for", r"""499999500000""")
|
||||
|
||||
BENCHMARK("method_call", r"""true
|
||||
|
||||
Reference in New Issue
Block a user