|
-
Nov 28th, 2002, 12:37 AM
#1
Thread Starter
Hyperactive Member
Just Got C#
Hi There!
I just downloaded .NET SDK and the free C# IDE and I have a problem with it - it is too slow. The IDE takes forever to load and takes forever to do stuff, especially painting windows.
Is there a way to speed all this up?
And By the Way, is Java and C# the same speed? The C# example apps and C# IDE take ages to load just like Java.
Thaks for any help.
-
Nov 28th, 2002, 08:03 AM
#2
Frenzied Member
What are your system specs? The free IDE loads at a decent speed on my Win2000, P3 500mhz, 256 mb ram system. If you have WinXP, that might be the culprit.
Dont gain the world and lose your soul
-
Nov 28th, 2002, 10:19 AM
#3
Hyperactive Member
..::[ kleptos]::..
- Database Administrator (MSSQL 2000)
- Application Developer (C#)
- Web Developer (ASP.NET)

-
Nov 28th, 2002, 02:15 PM
#4
Frenzied Member
Dont gain the world and lose your soul
-
Nov 28th, 2002, 04:06 PM
#5
Frenzied Member
sharpdevelop is pretty fast for loading
for my machine anways
(AMD 2200+, 512 DDR)
-
Nov 29th, 2002, 12:48 AM
#6
Thread Starter
Hyperactive Member
Runs awful
533 Mhz and 128 Mb Ram
OS: Windows 2000 Advanced Server
-
Nov 29th, 2002, 01:21 AM
#7
PowerPoster
And By the Way, is Java and C# the same speed? The C# example apps and C# IDE take ages to load just like Java.
The first time you run a C# app, or any .Net app, the code is compiled by the Just In Time compiler (JIT). You will notice a slow start because of this. Try running the app a second time, not from the IDE, but by clicking the EXE and see if it loads faster. This is because you are now using the binary instead of the MSIL, which has to be compiled by the JIT at first.
-
Nov 29th, 2002, 02:50 AM
#8
Thread Starter
Hyperactive Member
Thanks for the suggestion, that does work but I decided to benchmark C# against C++ and see what I have.
C#:
Code:
public static void Main(string[] args)
{
int ticks = System.Environment.TickCount;
int v = 0;
for(int i = 0; i < 2120000000; i++)
v++;
ticks = System.Environment.TickCount - ticks;
Console.WriteLine("Time Took: ");
Console.Write(ticks);
Console.WriteLine("\nItems: ");
Console.Write(v);
}
C++
Code:
int main(int argc, char* argv[])
{
unsigned long i = 0;
DWORD T = GetTickCount();
for (unsigned long var = 0; var < 2120000000; var++)
i++;
T = GetTickCount() - T;
printf("Time Took: %d\nItems: %ld", T, i);
return 0;
}
Results:
C++: 0 ticks 
C#: 8862 ticks 
This results are a bit weird - but they seem true to me. So, C# is unsuitable for commercial development for slower computers. Good langauge though.
NOTE: I did optimize C++ exe but I can't find optimizations for C# in my compiler - so this probably has something to do with this.
Last edited by made_of_asp; Nov 29th, 2002 at 02:55 AM.
-
Nov 29th, 2002, 03:27 AM
#9
PowerPoster
Just to be fair, create the integer variable outside of where you start counting the ticks like you did in the C++ example.
Code:
public static void Main(string[] args)
{
int v = 0;
int ticks = System.Environment.TickCount;
for(int i = 0; i < 2120000000; i++)
v++;
ticks = System.Environment.TickCount - ticks;
Console.WriteLine("Time Took: ");
Console.Write(ticks);
Console.WriteLine("\nItems: ");
Console.Write(v);
}
Still though, even with that modified, it can't compair to C++ as far as speed. It was never meant to. You can get a little speed back in C# if you wanted to use unmanaged code and pointers. You could probably come pretty close to closing that speed gap. But if you do that, why are you using C#?
Anyway, the strength of C# comes from the speed of your development. You can create a windows application in C# a hell of a lot faster than you could if you use C++, even using the MFC's. It comes down to this: Both languages have their roles in application development. Use the right tool for the job at hand. I am not going to use a hammer to take a screw out, and I am not using a screwdriver to nail in a nail.
-
Nov 29th, 2002, 04:02 AM
#10
Thread Starter
Hyperactive Member
Yes, I know C# is a RAD tool just like Visual Basic. I have a question though: are future commercial applications going to be developed in C++ or C#( I mean true applications, not database interfaces)?
You cant use int in C++ in that example because unsigned int only goes to around 65000.
Thanks for your help. I see that I'l need to learn C# sooner or later.
-
Nov 29th, 2002, 07:27 AM
#11
Frenzied Member
C# can be used for commercial apps. The VS.NET ide was written in C#. Also take a look at the ASP.NET web matrix, that was written in C# and considering the time it took, to write, I'd say its a very good app.
Dont gain the world and lose your soul
-
Dec 1st, 2002, 11:15 AM
#12
Hyperactive Member
If i might add, even though i use VS.NET, Web Matrix is a great application. I told a few friends about it and now thats all they use. So there are plenty of uses in a commercial world for C#, plus its not even a year old yet, so not everyone has decided to revamp their software yet. Personally, i love C#...
..::[ kleptos]::..
- Database Administrator (MSSQL 2000)
- Application Developer (C#)
- Web Developer (ASP.NET)

Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|