Faster common header handling#554
Conversation
Also has "Faster output header handling" aspnet#528 in it :-/
There was a problem hiding this comment.
Spelling. Fix commit message too.
There was a problem hiding this comment.
This word seems to haunt me for some reason
56ca33f to
d6463c7
Compare
There was a problem hiding this comment.
I chatted w/ @jkotas, and he suggested this could be simplified to:
static bool initializer;
public static void InitializeJitConstants()
{
initializer = BitConverter.IsLittleEndian;
}
All static fields of a class get initialized at once.
He also suggested it's better to avoid static variables altogether. This could probably be achieved by making Constants non-static and referencing the singleton instance using a property in ServiceContext. I think we should probably do this instead, so we don't need to worry about static initialization order.
|
Are the two commits in this PR related? Does one require the other? |
|
Yea, was just looking at that - I think it was because it was related to the earlier commit that was in here; will split again. |
d6463c7 to
f096964
Compare
|
Removed other PR |
|
Given the extra complexity this adds for the relatively small performance improvement, I'm not very inclined to merge this PR. |
|
This is really cool, but a little much for a 1% perf gain. |
No description provided.