
Thanks Simon.
On Wed, Jun 9, 2021, 04:07 Simon Cross <hodgestar@gmail.com> wrote:
On Wed, Jun 9, 2021 at 1:01 AM Joannah Nanjekye <nanjekyejoannah@gmail.com> wrote:
My only frustration with handles is overhead and high memory costs.
I thought I explained that this was not the case and that you agreed, so I am confused by you restating it.
I wonder if the GC in PyPy has been edited to support HPy already?
All handles are short lived so they don't cause GC fragmentation. For example, if I reimplement Victor's example in HPy one has:
// pseudo-code
void store(HPyContext *ctx, HPy list) { HPy obj = HPyLong_FromLong(ctx, 1);
HPyList_Append(ctx, list, obj); HPy_Close(ctx, obj);
// obj is stored after store exits, but no *handles* escape. // how obj is tracked by the Python implementation GC is completely hidden by the HPy API }
- Simon