I need speed Mr .Net....speed

H

Ham

Yeah,
Gotto work with my VB.Net graphic application for days, do any possible type
of code optimization, check for unhandled errors and finally come up with
sth that can't process 2D graphics and photos at an acceptable speed. I have
heard things about the virtual machine of Mr. Net, that it can run my app at
a high speed....but could never compare it with Java VM and its speed. Then,
what should i do? Go and learn C++ ? Do i have time for it? Can't Microsoft
enhance its .Net VM to run VB.NET applications at a C++ program speed?
.....And how long should we wait for reaching the Native speed?....
(and why the same managed C++ application run faster? We need more liberty
guys..)

(using VB.NET 2003 + Framework 1.1)

i stay here....
 
C

CJ Taylor

Try using DirectX. No need to learn C++ and performs a variety of 2D and 3D
functions for you [already written in C++]
 
G

Guest

For pure performance, C++ will beat .NET languages in graphics (at least in
most cases). The major .NET benefits is the ability to get deep into the
WIndows API without API calls, the speed of development, etc.

This is not saying .NET is not fast. I have an file manipulation application
that achieves astounding speeds (rips through an 8GB file (76 columns fixed
width) in less than 20 minutes on 1.6 GHz P4 with 512MB RAM.

One issue with VB.NET is when you use the "Crutches" in the language. The
extra weight can kill your app if max perf is the issue.

---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 
L

Larry Serflaten

Cowboy (Gregory A. Beamer) - MVP said:
One issue with VB.NET is when you use the "Crutches" in the language. The
extra weight can kill your app if max perf is the issue.

Specifically relating to graphics;

A.
Dim bmp as Bitmap = New Bitmap(3000,5000)

vs

Dim bmp as Bitmap = New Bitmap(3000,5000, Me.CreateGraphics)


B.
frmGraphics.DrawImage(bmpSource, Dest, Src, GraphicsUnit.Pixel)

vs

frmGraphics.DrawImageUnscaled(bmpSource, 0, 0)


The second option in both A and B can significantly increase
performance in performance critical code. That is to say, there
are performant routines in the .Net framework, the trick is knowing
where they are, and how to put them to use...

LFS
 
H

ham Come>

Let me clarify it:
I work currently on a bitmap editor and want to edit images pixel by pixel.
I mean using " GetPixel(i,j) and SetPixel(i,j,color) "....
The application has to go through the whole pixels and do the operation by
using" For-Next" loops. It works fine on upto 1000 * 800 bitmaps, but on
higher
resolutions, event with a separate thread for this Sub, the result is really
frustrating. My P4 2.4 GHZ computer hangs and this some times takes a minute
for a simple operation.....

And for the guy who said to use DirectX ....
First of all, direct X does not give all the facilities of GDI+....
Second, I have a lot of limitations concerning the size of my App and its
distribution...
That's why I never go towards DX for those GDI+ operations...

Thanks...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,835
Latest member
KetoRushACVBuy

Latest Threads

Top