Speed

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

H

Is it possible that the Personal edition of C#, provided for free with the book Study C# Deluxe, produces very slow code? When I write a loop at home that creates a 100,000 objects, it takes the App almost 1.5 minute. When I do this in VS 2002 enterprise, it takes only a couple of MSecs

I was really disappointent about the speed yesterday, but I think I have a wrong version

Kind regards
Alexander
 
Zanzibar said:
Is it possible that the Personal edition of C#, provided for free
with the book Study C# Deluxe, produces very slow code? When I write
a loop at home that creates a 100,000 objects, it takes the App
almost 1.5 minute. When I do this in VS 2002 enterprise, it takes
only a couple of MSecs.

I was really disappointent about the speed yesterday, but I think I
have a wrong version.

I presume you mean the personal edition of Visual C#. It shouldn't
produce any slower code - I suspect that either you've got different
code in your two test apps, or something else is different.

Can you post the "slow" code you're using?
 
Well, it could be that the Personal edition misses the optimizing compiler,
but I am not sure really.

Zanzibar said:
Hi

Is it possible that the Personal edition of C#, provided for free with the
book Study C# Deluxe, produces very slow code? When I write a loop at home
that creates a 100,000 objects, it takes the App almost 1.5 minute. When I
do this in VS 2002 enterprise, it takes only a couple of MSecs.
 
H

Below you have sortlike source. This is the test I performed today. If I'm not mistaken the source from yesterday was more or less the same.

The class I was using yesterday was inside a seperate classlibrary and I was debugging this with a Startup project. Might this make difference

Kind regard

Alexande

internal class Tes

private string FStr
private int FInt

public Test(string aStr, int aInt

FStr = aStr
FInt = aInt



private void button1_Click(object sender, System.EventArgs e

textBox1.Text = DateTime.Now.ToString()
for (int I = 1; I <= 1000000; I++) new Test("Hallo" + I.ToString(), 12)
textBox2.Text = DateTime.Now.ToString()
 
Zanzibar said:
Below you have sortlike source. This is the test I performed today.
If I'm not mistaken the source from yesterday was more or less the
same.

So was that the very slow source, or not? Please post the code which
took a long time. Slight changes to the code could make a *big*
difference in execution speed.
The class I was using yesterday was inside a seperate classlibrary
and I was debugging this with a Startup project. Might this make
difference?

Shouldn't really.

If you can post the code which took ages, and possibly email me the DLL
it produced, that would help.
 
Stupid m

I figured it out. I was using a debugassambly with different code than the editor was showing to me. In Delphi this happens sometimes to and is very, very confusing. In the old source the item was added to an array and was checked each time for existance

Many thanks anyway

Kind regard
 
Back
Top