Re: C# and compiler optimizer.
- From: Helge Jensen <helge.jensen@xxxxxxx>
- Date: Fri, 15 Apr 2005 11:20:27 +0200
Olaf Baeyens wrote:
Which specific performance problem do you have which can be solved by letting you specify inlining?
Doing vector calculation, a few millions of them in one pass. :-)
Aaah, you're actully doing something -- not just reacting to GUI ;)
Try to do some timings on it, it may be as fast as native, or it may not...
If it is slow, you could try to factor that part of the code out, so you can reimplement it natively when performance starts rearing it's ugly head.
Those vectors have public properties X, Y and Z that (looking at IL asm) appears not to be inline even though they are just stupid float without any additional coding.
Why are you using properties? are you implementing/inheriting an interface/class?
The exported code has to have the public properties, for other code to be able to acces them, they are public :)
The JIT might inline the access while running, if it's called a lot.
the creation of the code and discover that is slows down too much. Then I am going to look at the generated x86 code to see what the JIT did do.
Generally, doing a test with timings is a very informative and cheap way to evaluate performance.
Yes assuming they have tons of time to analyze your program running and<theory> A JIT can just start by running the optimizations a traditional compiler would do. Offline compilers can never be more "optimizing" than JIT. </theory>
notice the "<theory/>" ;)
optimize most used functions even further dynamically.
Compilers (and some JIT's) today have *very* advanced analysis of when inlining should be applied and when it should not.
One of the things I am wondering is does you get a performance loss if you use a class in one assembly that is defined in another assembly?
Try to make some timings, it won't take long :) I wouldn't expect any difference.
The assemblies are dll's, and I do know that dll's creates overhead in the transition from one executable into your dll function.
But this is JIT, and the resolution of the just-address-resolution *could* be done just once, when the code is jit-compiled and inserted literally into the compiled version of the code. Try and time it.
-- Helge Jensen mailto:helge.jensen@xxxxxxx sip:helge.jensen@xxxxxxx -=> Sebastian cover-music: http://ungdomshus.nu <=- .
- Follow-Ups:
- Re: C# and compiler optimizer.
- From: Olaf Baeyens
- Re: C# and compiler optimizer.
- References:
- C# and compiler optimizer.
- From: Olaf Baeyens
- Re: C# and compiler optimizer.
- From: Helge Jensen
- Re: C# and compiler optimizer.
- From: Olaf Baeyens
- C# and compiler optimizer.
- Prev by Date: Free database for windows ?
- Next by Date: Re: casting an object to a specific type
- Previous by thread: Re: C# and compiler optimizer.
- Next by thread: Re: C# and compiler optimizer.
- Index(es):
Relevant Pages
|