Performance of typed.List outside of jit functions

@esc Yes that sounds mostly right to me.

Although I think c) would also require some small additions to the NRT. I don’t know that you could make that one work only with an intrinsic. Ultimately you would want the meminfo pointer to be accessible as quickly as possible. Right now it is stuck in the _opaque slot of the List python object so you need to call into the C python API to retrieve it. The faster way would be to extend PyObject in C and tack on the meminfo pointer to the end of the PyObject struct. Then an intrinsic could be written to just load from that attribute. This way you are just dereferencing a pointer to get it. I suppose this would also require some changes to the boxing/unboxing of List. But I suspect these changes would make other things faster as well like returning a List object from a jitted function, since you would avoid some of the overhead of writing into the _opaque slot as well. For backwards compatibility reasons it may also make sense to define a getter to take the place of _opaque so that any unit tests that check meminfo.refcount don’t break.