Performance Considerations

Only way to estimate performance is comparing with something else. Will look at some cases.

Manual Implementation

Performance tests, comparing Yappi with manual implementation are included in latest release. Yappi is definitely slower then manual implementation dew to some runtime performance cost. Performance loss is not dramatic. It consists mostly of  delegate invocation cost in compare with direct method call. But Yappi gives you a lot of flexibility, saves time and so on.

Text Templates

Text templates can be as effective as manual implementation, but can be applied only to well known (at compile time) types. If it is your case – use text templates.

Custom Build Step

Building your own build step will probably result faster code. But this way is more complicated, less flexible, and harder to debug. Any change in specification will result change in build step.

Core benefit is there are ready third party solutions for some concrete tasks (like INPC implementation).


Yappi will be faster then aspects in most cases dew to lot of custom code, required for argument packing, reflection, and so on. Aspect’s optimization for performance in most cases leads to debugging complexity. If Yappi covers your needs, try to use it instead.

Runtime Type Generators

Yappi is one of them. Yappi’s core feature (in compare with others) is an ability to define implementation without any reflection, boxing|unboxing and in fully type-safe manner in pure C#, leading to clear and effective code. If you need it try Yappi.

Last edited Jul 22, 2011 at 12:28 PM by Kelqualyn, version 3


No comments yet.