469,310 Members | 2,542 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,310 developers. It's quick & easy.

Inline functions

kd
Hi All,

Does vb.net support inline functions?

kd.
Nov 21 '05 #1
11 6378
KD,

Does vb.net support inline functions?


Can you explain why you ask this in the context of the language.vb?

Cor
Nov 21 '05 #2
kd
Cor,

I have a procedure which has few lines of code that I need to execute very
frequently in the project. If the procedure were to be 'Inline', the
overheads of a function call can be eliminated.

If there is something like an 'Inline' function available in vb.net, I could
use that feature.

Thanks.
kd

"Cor Ligthert" wrote:
KD,

Does vb.net support inline functions?


Can you explain why you ask this in the context of the language.vb?

Cor

Nov 21 '05 #3
KD,

In my opinion do we not live anymore in the century from the invention of
the Unix computer.

You can be sure that using ILS language the processing is not direct, as it
is with almost every computersystem invented after 1960. (Not about
processors for coocking machines and things like that).

How many cycles of the processor you need to win?

You know that a computer needed for Net has at least something as 90Mhz.

What means 90 million cycles per second.

Cor

Nov 21 '05 #4
kd
Cor,

I have a procedure which has few lines of code that I need to execute very
frequently in the project. If the procedure were to be 'Inline', the
overheads of a function call can be eliminated.

If there is something like an 'Inline' function available in vb.net, I could
use that feature.

Thanks.
kd

"Cor Ligthert" wrote:
KD,

Does vb.net support inline functions?


Can you explain why you ask this in the context of the language.vb?

Cor

Nov 21 '05 #5
KD,

In my opinion do we not live anymore in the century from the invention of
the Unix computer.

You can be sure that using ILS language the processing is not direct, as it
is with almost every computersystem invented after 1960. (Not about
processors for coocking machines and things like that).

How many cycles of the processor you need to win?

You know that a computer needed for Net has at least something as 90Mhz.

What means 90 million cycles per second.

Cor

Nov 21 '05 #6
"kd" <kd@discussions.microsoft.com> schrieb:
Does vb.net support inline functions?


Some of the VB functions are inlined by the compiler. The JITter will
inline small functions automatically. However, you don't have control over
this process, which gives the JITter more flexibility to optimize your code.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #7
"kd" <kd@discussions.microsoft.com> wrote in message
news:36**********************************@microsof t.com...
Hi All,

Does vb.net support inline functions?

kd.


I've never seen any reference to it.

However, I think that the compiler makes the call whether to inline the
function and its not something you have explicit control over. This is based
on what little information I could find on the net.

Hope this helps,

Brian

www.cryer.co.uk/brian
Nov 21 '05 #8
"kd" <kd@discussions.microsoft.com> schrieb:
Does vb.net support inline functions?


Some of the VB functions are inlined by the compiler. The JITter will
inline small functions automatically. However, you don't have control over
this process, which gives the JITter more flexibility to optimize your code.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #9
"kd" <kd@discussions.microsoft.com> wrote in message
news:36**********************************@microsof t.com...
Hi All,

Does vb.net support inline functions?

kd.


I've never seen any reference to it.

However, I think that the compiler makes the call whether to inline the
function and its not something you have explicit control over. This is based
on what little information I could find on the net.

Hope this helps,

Brian

www.cryer.co.uk/brian
Nov 21 '05 #10
kd,

The JIT compiler will automatically inline small methods. I believe
the threshold is 32 bytes. Simple properties are ideal candidates.
One advantage of letting the JIT compiler do this automatically is that
it can inline methods across assembly boundaries.

Brian

kd wrote:
Cor,

I have a procedure which has few lines of code that I need to execute
very frequently in the project. If the procedure were to be 'Inline',
the overheads of a function call can be eliminated.

If there is something like an 'Inline' function available in vb.net,
I could use that feature.

Thanks.
kd


Nov 21 '05 #11
kd,

The JIT compiler will automatically inline small methods. I believe
the threshold is 32 bytes. Simple properties are ideal candidates.
One advantage of letting the JIT compiler do this automatically is that
it can inline methods across assembly boundaries.

Brian

kd wrote:
Cor,

I have a procedure which has few lines of code that I need to execute
very frequently in the project. If the procedure were to be 'Inline',
the overheads of a function call can be eliminated.

If there is something like an 'Inline' function available in vb.net,
I could use that feature.

Thanks.
kd


Nov 21 '05 #12

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

13 posts views Thread by A | last post: by
14 posts views Thread by Chris Mantoulidis | last post: by
47 posts views Thread by Richard Hayden | last post: by
7 posts views Thread by Srini | last post: by
4 posts views Thread by Tony Johansson | last post: by
7 posts views Thread by Alvin | last post: by
43 posts views Thread by Patrick Laurent | last post: by
18 posts views Thread by Method Man | last post: by
12 posts views Thread by sam_cit | last post: by
2 posts views Thread by aaragon | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by harlem98 | last post: by
1 post views Thread by Geralt96 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.