Re: Best charting package



Hi Serge,

You're right about the property inlining, but it is present only in the
..NET framework 2.0 and to a certain level - for example having a simple
if statement in the property may disable the property from inlining.
In version 1.x the specs say that if the class is marked as sealed the
compiler will attempt to inline code however that does not happen - it
will always compile to a function call. I guess in 2.0 the jitter
rectifies this to some extend in order to improve the framework
performance because the whole code is written with property access.

Best regards,
Bob

Serge Baltic написа:
Hello,

The drawbacks of C# performance wise:

- If I can I would like to be able to control if a variable is stored
in a register or not. This is a must have for any language that is
targeting performance.

- Inline functions / properties are badly missing.

They're just as missing in modern C++ compilers. MSVC would ignore the register
and inline hints relying more on its judgement of what should be optimized
in the code. On the other hand, the .NET JITter is capable of register-ing
the variables (or, better to say, the evaluation stack items) and inlining
certain methods and properties. On this matter, accessing a field thru a
property does not necessarily mean a function call.

(H) Serge

.



Relevant Pages

  • Re: Experiences using "register"
    ... Because it adversely affects code size is one thing I can think of ... inlining may even decrease the code size. ... The main purpose of inline is to take away the function call and return ... Again the standard inline keyword is like register: ...
    (comp.lang.c)
  • Re: inline
    ... normal inline function definition - Stand-alone object code is always ... Where will be the practical use/application of these ('static inline ... Most compilers are smart about inlining and only use inline as a hint, ... register allocators work better on smaller functions with low register ...
    (comp.arch.embedded)
  • Re: GCC 3.4 and broken inlining.
    ... But, like the `register' keyword, it's just a hint. ... but you can take the address of an inline ... The issue with inlining that makes it important for the compiler to ...
    (Linux-Kernel)
  • Re: inline functions not inlined
    ... occur if the inline function is defined within the same file that it is ... Maybe it's an added complexity like 'register' which the language ... I suspect that modern compilers aren't as good at automatically ... inlining functions as they are at assigning variables to registers, ...
    (comp.lang.c)
  • Re: [patch] measurements, numbers about CONFIG_OPTIMIZE_INLINING=y impact
    ... So take your complaint about gcc's decision to inline functions called ... The problem with that is that the kernel _isn't_ a normal app. ... And outside of those kinds of very rare niches, big kernel dumps simply ... Sure, shrinking code is good for I$, but on the other hand inlining ...
    (Linux-Kernel)