[Mono-dev] vbnc optimization

Ben Maurer bmaurer at ximian.com
Sat Oct 21 15:52:03 EDT 2006


> Hey guys,
>
> Miguel asked me to look in to vbnc's performance this weekend, as it was
> pretty slow to bootstrap. I got one quick win today -- it looks like there
> are a few calls to Diagnostics.StackTrace in ParsedObject My understanding
> is that this stores a stack trace for every token in vbnc. Killing this
> cut the compiler memory almost in half. The code should probably be off by
> default.
>
> One thing I noticed is that I got compilation errors when compiling
> without DEBUG. It may be worth trying to get that mode working, so we can
> benchmark without all the extra code.

Two other fairly big items:

Modifiers doesn't work very well. It's using a List<T> to store the
modifiers. It's best to use a bitflags type enum. There were millions of
calls being made to Contains during bootstrap.

the BaseObject.Compiler calls recursed up the parse tree fairly deeply.
Maybe this should be a static object or something.

-b




More information about the Mono-devel-list mailing list