Implement fast stelemref.
* class.c (mono_class_setup_vtable_general): Inject the array stelemref method on vectors of reference types. * class.c (mono_class_init): Properly handle the fact that arrays have different vtable sizes. * marshal.c (mono_marshal_get_virtual_stelemref): New function that returns a better tailored stelemref wrapper for a given array type. * method-to-ir.c (mono_method_to_ir): Emit a virtual call to the new faster stelemref wrapper. This schema uses 4 wrappers instead of one and puts it into the vtable of vectors of reference types. This change improves a synthetic benchmark of an equal mix of stores as compiling corlib by 25%. It improves pystones by 3-4%.
Showing
想要评论请 注册 或 登录