BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How fast are .net programs?

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Upgrade
View previous topic :: View next topic  
Author Message
Robert
Guest





PostPosted: Mon Feb 09, 2004 1:52 pm    Post subject: How fast are .net programs? Reply with quote



My application, written in Delphi 4, uses a lot of math, array and sorting
(recursive type) functions; program execution speed is my main concern. The
program may take about 15 minutes to fully execute running on a 1ghz
machine. If this program were converted to .net, would the program run any
faster?

Thanks.


Back to top
Mike Williams (TeamB)
Guest





PostPosted: Mon Feb 09, 2004 2:19 pm    Post subject: Re: How fast are .net programs? Reply with quote



On 09 Feb 2004, "Robert" <numeric (AT) worldnet (DOT) att.net> wrote:

Quote:
My application, written in Delphi 4, uses a lot of math, array and
sorting (recursive type) functions; program execution speed is my main
concern. The program may take about 15 minutes to fully execute
running on a 1ghz machine. If this program were converted to .net,
would the program run any faster?

This is a really tough question to answer without knowing more about
your code. .NET apparently does a great job of optimization to
compensate for the fact that the code is compiled on the fly (JITed).
..NET programs can actually improve in performance the longer they run
because of new optimizations that are introduced along the way based on
knowledge learned from the running program.

On the other hand, how much optimization have you already done? If
you're convinced that your algorithm is the best possible and you've
carefully benchmarked and subsequently tweaked every performance
bottleneck then a port to .NET will most likely not speed things up.
I've even heard that you're better off not trying to outguess the .NET
optimizer.

--
-Mike (TeamB)


Back to top
Charles Appel
Guest





PostPosted: Mon Feb 09, 2004 2:52 pm    Post subject: Re: How fast are .net programs? Reply with quote



"Robert" <numeric (AT) worldnet (DOT) att.net> wrote

Quote:
My application, written in Delphi 4, uses a lot of math, array and sorting
(recursive type) functions; program execution speed is my main concern.
The
program may take about 15 minutes to fully execute running on a 1ghz
machine. If this program were converted to .net, would the program run any
faster?

In my (limited) experience, .NET programs generally run
more slowly than 32-bit native code. I have conducted
only a few tests, but so far I have found no case in which
a .NET program was faster than a native code program.
In my tests, native code Delphi programs range from a
tiny bit faster to over 1200% faster than .NET code.
Others may have had different experiences.

Charles Appel



Back to top
Ben Hochstrasser
Guest





PostPosted: Mon Feb 09, 2004 4:03 pm    Post subject: Re: How fast are .net programs? Reply with quote

Robert wrote:

Quote:
If this program were converted to .net, would the program run any
faster?

Given my (limited) experience with dotnet-converted programs, I'd say "no".
When you look how speed-critical parts (i.e. FastStrings) are coded in pure
assembler I have serious doubts that dotnet with its just-in-time
compilation performs better.
I'd say dotnet is better at running "longlife" applications (that need to
be up 7x24 over long periods of time) than running math-intensive number
crunching applications.

--
Ben

Back to top
Ron Cis
Guest





PostPosted: Mon Feb 09, 2004 4:26 pm    Post subject: Re: How fast are .net programs? Reply with quote

Can you mix old code with NET easily?

"Mike Williams (TeamB)" <mikew (AT) remove (DOT) aps-soft.com> wrote

Quote:
On 09 Feb 2004, "Robert" <numeric (AT) worldnet (DOT) att.net> wrote:

This is a really tough question to answer without knowing more about
your code. .NET apparently does a great job of optimization to
compensate for the fact that the code is compiled on the fly (JITed).
.NET programs can actually improve in performance the longer they run
because of new optimizations that are introduced along the way based
on
knowledge learned from the running program.
--
-Mike (TeamB)




Back to top
Mike Williams (TeamB)
Guest





PostPosted: Mon Feb 09, 2004 4:58 pm    Post subject: Re: How fast are .net programs? Reply with quote

On 09 Feb 2004, "Ron Cis" <aron (AT) a1-vegas (DOT) com> wrote:

Quote:
Can you mix old code with NET easily?

Yes. Delphi 8 for .NET has some really cool stuff that makes that easier
to do than in other .NET languages.

--
-Mike (TeamB)

Back to top
Brion L. Webster
Guest





PostPosted: Mon Feb 09, 2004 5:34 pm    Post subject: Re: How fast are .net programs? Reply with quote

Robert wrote:

Quote:
My application, written in Delphi 4, uses a lot of math, array
and sorting (recursive type) functions; program execution speed
is my main concern. The program may take about 15 minutes to
fully execute running on a 1ghz machine. If this program were
converted to .net, would the program run any faster?

I've seen this pretty hotly debated, and as usual it seems to come
down to the skill of the programmer and his/her knowledge of the
platform. GUI updating seems to be slower, because GDI+ or
whatever's in .NET doesn't use hardware acceleration. The first
run of a .NET program takes a huge performance hit because the IL
gets compiled the first time. Once it's compiled, things seem to
even out. You should make sure your (or whoever's giving you)
benchmarks check second or third runs, not first runs, unless you
really do need first run timings.

-Brion

Back to top
Robert
Guest





PostPosted: Tue Feb 10, 2004 4:26 am    Post subject: Re: How fast are .net programs? Reply with quote

Thanks to all who replied; very helpful insight. From the comments, it
sounds like speed performance was not a top priority; obviously then, .net
is not a suitable framework to support my type of applications.


Back to top
BOB-O-MATIC
Guest





PostPosted: Fri Feb 20, 2004 9:49 pm    Post subject: Re: How fast are .net programs? Reply with quote

I'd have to disagree. I have an app with way over 500,000 lines of code,
and it uses lots of very large arrays and lots of small arrays and lots of
string manipulation. And it runs a little faster in .NET than in Win32.
However, our current version is 20x faster than our first .NET version,
because we used a lot of code profiling to tune it. We also rewrote some
..NET routines like String.IndexOf() to use faster algorithms.

I would NOT convert an app to .NET for speed reasons, but I would not worry
that performance would be less, either.

BTW, the String issue is moot since in .NET strings are immutable and, like
Java, you use a StringBuilder (StringBuffer in Java) for string
modifications.


Back to top
Josh
Guest





PostPosted: Sat Mar 06, 2004 2:40 am    Post subject: Re: How fast are .net programs? Reply with quote


Quote:
Thanks to all who replied; very helpful insight. From the comments, it
sounds like speed performance was not a top priority; obviously then, .net
is not a suitable framework to support my type of applications.

Yes, but you can't have a real comparison don't you think?
You can not just drag an old program in .NET and with a few adjustments
compile it and then make the comparison.
That's not a fair comparison for several reasons.
..NET might have new techniques that most new users are not aware of, things
that improve the performance
Also, .NET uses a lot more memory, so your .NET application will have less
memory available if you run it from inside the IDE. The question is; how did
people do this tests; inside or outside the IDE?
Delphi 8 is quite new. I do expect some performance improvements in the near
feature. I also expect some framework improvements on Microsoft's side.





Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Upgrade All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.