Skip to content
Rick-van-DamPublic

About

Making reflection fast and simple

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

31 Commits

Folders and files

Repository files navigation

Mirror

How to do Reflection fast while keeping a simple API.

What is this?

This little library makes it easy to get a Func when given only a type, methodname and optionaly some generic parameters. The main advantage of this is that its alot faster to invoke a a Func than it is to use MethodInfo.Invoke. Some performance numbers:

2018-03-23 21_44_08-c__windows_system32_cmd exe

As you can see creating the delegate is expensive but once you have it its alot faster than MethodInfo.Invoke and comes within the same order of magnitude as a interface call.

What is this not?

A complete reflection framework. Iam trying to keep this as simple as possible and purely focusing on invoking a method using reflection as fast as possible. The main reason this repo exists is for other ppl to learn how to do this but feel free to use the code. I have tried to unit test as many cases as possible to eliminate any bugs.

Quickstart

The code that does the heavy lifting can be found here. To find a example of how to use this you can check this.

About

Making reflection fast and simple

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages