Home > Uncategorized > Fasterflect – a fast and simple API for Reflection invocation

Fasterflect – a fast and simple API for Reflection invocation

If you think the built-in Reflection API in the .NET framework is too verbose for many circumstances and has poor performance, you are not alone. I think that too. And yet, being able to write reflective code is an inevitable (technical) requirement in most of the applications I develop. This is why I have built Fasterflect (read either “Faster-flect” or “Fast-reflect”) as an alternative API to the .NET Reflection functionality.

The goal of this library is to make Reflection calls as straightforward as possible while offering better performance than normal Reflection calls. In this article, I’ll describe the approach chosen to build Fasterflect, its APIs, and measure its performance via some benchmarks.

You can refer to this Code Project page for the guide to the library. For latest development code & binary, refer to the project page in CodePlex.

Updated 8/19/2009: Version 1.0 is released and can be downloaded from the CodePlex project page. This release supports ref/out parameters for methods/constructors/indexers and structs. Implementing support for struct has been quite challenging (and thus interesting) due to its data-copy parameter passing semantic and my design goal of sharing the API for both structs & classes (instead of creating a bunch of overloads for structs).

  • Share/Bookmark
  1. Kerem Kusmezer
    November 19th, 2009 at 20:12 | #1

    I checked your library and it seems really promising specially your way of working and wrapping structs and valuetypes, which has been a great problem for me for a while.

  2. November 19th, 2009 at 22:11 | #2

    @Kerem: I’m glad you like it. I found support for struct challenging as well :) .

  1. No trackbacks yet.