By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,420 Members | 1,430 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,420 IT Pros & Developers. It's quick & easy.

Speed

P: n/a
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
Nov 16 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Zanzibar <am**************@hotmail.com> wrote:
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?

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #2

P: n/a
Well, it could be that the Personal edition misses the optimizing compiler,
but I am not sure really.

"Zanzibar" <am**************@hotmail.com> wrote in message
news:65**********************************@microsof t.com...
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.
I was really disappointent about the speed yesterday, but I think I have a wrong version.
Kind regards
Alexander


Nov 16 '05 #3

P: n/a
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()
Nov 16 '05 #4

P: n/a
Zanzibar <an*******@discussions.microsoft.com> wrote:
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.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #5

P: n/a
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

Nov 16 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.