Hi, A simpler solution would be to emit the code below inline instead of making a call to a trampoline at all.
Zoltan > deref vtable->initialized > compare/and > ret > branch to icall > so basically just 4-5 instructions executed in the common case instead > of all the cost of going to unmanaged and back. > > There is an alternative solution which we could implement as well, > though this requires one additional pointer per MonoVTable. > When the MonoVTable is created this pointer is set to the icall and once > the type is initialized it is set to a tiny function that just does: > > ret > With this the initialization becomes a memory dereference and an > indirect call+ret. The runtime cost is similar to the above solution > (in AOT code we'd even avoid a PLT call), but it has the additional > memory overhead. > > Other suggestions for optimizing this codepath are welcome as well. > > lupus > > -- > ----------------------------------------------------------------- > [EMAIL PROTECTED] debian/rules > [EMAIL PROTECTED] Monkeys do it better > > _______________________________________________ > Mono-devel-list mailing list > Mono-devel-list@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/mono-devel-list > _______________________________________________ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list