Originally posted by bogeyman
For example I've got a perl script that would generate optimised code for some different situations, to maintain it I just need to maintain single piece of code plus script, the end code may not be readable but its extremely fast - this is what is required from any base library that actually ships without source in the first place.
The most efficient variable swap would load such vars into registers and does a very quick swap, this is particularly good if along the execution path such variables will already have to be loaded into registers, so it means such swap can be done very nicely indeed with zero overhead. Of course this function should have been written in low level .NET assembly rather than C# - its sorting, it has got to be extremely fast not just algorithmically but also taking advantage of very good implementation. If I know it then people employed by Microsoft to do such a basic thing should know it 10 times better than me.
Comment