moritzuehling/demoinfo-public — pull request #22 by main-- (2014-12-16 09:15:26+00:00)
Title: System.Reflection.Emit magic activated

Before:

```
3508 2353 5742735 System.Type:get_IsSystemType ()
5714 2099 2603928 System.Type:IsSubclassOf (System.Type)
```

After:

```
808 536 1268117 System.Type:get_IsSystemType ()
1509 569 634531 System.Type:IsSubclassOf (System.Type)
21450 123 267484 (wrapper dynamic-method) object:DemoPacketParser__GetPacketType (System.IO.Stream,int)
```

This means: >3s vs 123ms (if you just look at their self times, otherwise it's up to 7s). Not too bad.

And omg looks like protobuf is incredibly slow.

TODO: Find out how Microsoft's .NET reacts to this (for you, @moritzuehling)
TODO: Find out if the generated code is verifiable (it probably isn't), decide if the performance penalty is worth verifiability (it probably is).

So don't merge yet.