+ 2 - 3 | § ¶Faster binary serialization!
I've been learning some IL (fascinating) and I decided to apply my new skills in the optimization of the binary formatter. The idea is to generate IL code for some parts of the serializer that currently rely on reflection to do its job (for example, getting data from object's members).My first change achieved a x3 performance boost in object serialization, not bad at all! But it still can be improved. Right now I'm not generating code for classes that use custom serialization, because the data structure to be serialized may change for every class instance. But I have some ideas to cope with this.
The binary serializer is important because it is used to marshall data between application domains, so cross-appdomain calls should be faster now. Well, not all of them. Calls that only have primitive types as parameters (or arrays of primitive types) are not marshalled using the serializer, but a special "manual" marshalling is used instead. But well, that's another story.