[Mono-devel-list] [PATCH] isinst/castclass optimizations

Ben Maurer bmaurer at users.sourceforge.net
Fri Mar 12 18:18:33 EST 2004


Ok, apparently 1 is causing regressions, so i have extracted 2 out and
attached it below. I will fix part 1 and send it later.

This patch simply special cases sealed types, such as blah is string.

On Thu, 2004-03-11 at 23:47, Ben Maurer wrote:
> Hey guys,
> 
> I have a quick patch that speeds up operations with castclass and
> isinst. It does two things:
> 
> 1) isinst has a special case for when it is being used as foo is Type.
> 2) isinst and castclass are faster when they are checking on a sealed
> type. it just compares obj->vtable->klass to the klass rather than
> looking up the supertype table.
> 
> Together I was able to get a 1-2% perf boost in mcs bootstrap.
> 
> Attached is the patch. It also includes my test case for measuring raw
> performance.
> 
> -- Ben
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mini-typecheck-sealed.patch
Type: text/x-patch
Size: 4983 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040312/0af57b58/attachment.bin 


More information about the Mono-devel-list mailing list