@Mike. I unfortunately had already checked that out and found AgressiveInlining missing in Netmf. None of the other ones seem to be related except for “NoInlining” … I didn’t try it out but I assume it does precisely the opposite of what I want.
@Mr_John_Smith Perhaps I am looking for Anonymous Methods? I need to research this term.
To further clarify what I mean consider this:
Let’s say I have…
public void DoWork(int b, int c)
int a = b + c;
and I’ll make up some IL-like language for this function:
add B, C, A;
And then I have another function,
public void DoWork_TheCallingFunction()
As it stands the IL for DoWork_TheCallingFunction would be like this:
@Brett I want to see if it is faster. If it were to be faster than I can leverage it in many places in my program and I might find that my Main Program Update loop hits higher frequencies. And I have a target frequency that I have not hit yet.
The reason I think it will be faster is because it is to my knowledge always faster… even in native environments. It simply yields less instructions to execute no matter how you look at it.
There are examples of using the AgressiveInline MethodImplOption in the full .Net that bring some trivial example routine (just like the one I gave) down from 7.2 ns to 0.3 ns
I’m also recalling that the Netmf stack is built on the heap… which makes me think that function calls carry a significant overhead just in this regard.
I could be wrong… but I’m pretty sure this is a very common tactic in embedded programming which sacrifices code size for speed while maintaining readability of the source.
…where implemented. That in itself will be the Achilles Heel for many things in netmf - the goals were to cut the crap to the bare bones, to get on smaller micros. Which means features like this get cut, and you have to compromise. Not saying that this is bad, just saying your expectation that you have magic tweaks at your fingertips needs to be tempered