| View previous topic :: View next topic |
| Author |
Message |
Vincent Diepeveen
Joined: 09 Mar 2006 Posts: 1738 Location: The Netherlands
|
Post subject: Re: C# Performance Posted: Sun Feb 19, 2012 9:32 pm |
|
|
| Richard Allbert wrote: |
Hi Vincent,
Not seen you for a while now, hope you are well!
As you've read on this thread, there has been quit
e a lot of performance testing.
I thought at first that C# was 'slow', but I must say that with AB search implemented, and a basic eval, I get withing 80% of the same C++ program, using as similar a structure as possible.
I agree that you do have to put some thought into how to structure things - such as flattening arrays, and profiling to check heap object creation, but there are also a lot of pitfalls in C++ - such as the behind the scenes copying of classes if you don't override the the copy constructor to stop it. Us ing a profiler has hepled a lot in making sure problems are avoided.
C is different, I know, and has fewer traps, but you need to be very good at it all the same - Crafty an example.
A key part of what you wrote is that an "expert C programmer" would get more performance than an expert C# programmer.
And remember the winner of the Facebook Hacker cup 2011 who used which language? Java! The other finalists all used C++/C.
Anyway, writing the engine in C# has (so far) been a nice experience, and due to the availability of good Logging, MySQL, String, Thread libraries, the more "mundane" programming is implemented much more easliy.
I don't want to creat a C vs C# row either But both have advantages and disadvantages
Ciao,
Look forward to meeting again
Richard |
you don't get within 80% of the speed of good C++. problem is you need to compare with the utmost best. default c++ is also losing factor 2 to 3 or so to real good c++.
ask some c++ programmers over here...
in itself what language you start with doesn't matter - the problem is that no one when their engine gets a tad stronger can easily switch languages as then they lose what they already wrote.
that's the real problem.
how about this richard, why not start c++.
you can use everything you use in C# as well kind of. just don't use any weirdo c++ constructs you don't know about. probably you'll end up with a real slow engine as well, yet you can still later on speed that up.
what i dislike of c++ is that basically you need a hack to do multithreading.
note i use c++ bigtime for GUI programming so i'm not exacty a stranger. also i did do some java/javascript programming in past (who didn't) so i know the sad feeling you get in java.
C# i kept away from - the salary to convince me programming C# is at least 6 digits and when you double it will approach 7 digits rapidly
the real advantage of C over C++ for a single programmer, as i would never recommend a company with many programmers using an imperative language, is that there is hard defined limits in the language where you know EXACTLY that the compiler can optimize it well and you do not know that with c++. to figure that out with c++ takes forever and is total compiler dependant and has nothing to do with the actual ISO standard.
besides you need to pay bigtime for c++ iso. to get it the legal way it's what is it $400 or so?
then you have a truckload of documentation that'll take you 30 years to figure out.
that's where java was doing better and initially C# as well. But by now i understood they added a lot of nonsense to C# as the language was too slow; a language that needs 100 tricks to not be ultra slow by default is not a good idea Richard!
what's the difference between C++ and C# and Java in the first place, except that C++ gives you the option to be one day REALLY FAST. Same speed like C.
Vincent |
|
| Back to top |
|
 |
|
| Subject |
Author |
Date/Time |
C# Performance |
Richard Allbert |
Fri Jan 27, 2012 8:41 pm |
Re: C# Performance |
Kevin Hearn |
Fri Jan 27, 2012 9:01 pm |
Re: C# Performance |
Richard Allbert |
Fri Jan 27, 2012 9:13 pm |
Re: C# Performance |
Gary |
Fri Jan 27, 2012 9:07 pm |
Re: C# Performance |
Richard Allbert |
Fri Jan 27, 2012 9:17 pm |
Re: C# Performance |
Gary |
Fri Jan 27, 2012 10:09 pm |
Re: C# Performance |
Mark Pearce |
Sat Jan 28, 2012 12:59 am |
Re: C# Performance |
Richard Allbert |
Sat Jan 28, 2012 8:44 am |
Re: C# Performance |
Sven Schüle |
Sat Jan 28, 2012 9:48 am |
Re: C# Performance |
Richard Allbert |
Sat Jan 28, 2012 10:25 am |
Re: C# Performance |
Richard Allbert |
Sat Jan 28, 2012 11:41 am |
Re: C# Performance |
Mark Pearce |
Sat Jan 28, 2012 11:44 am |
Re: C# Performance |
Richard Allbert |
Sat Jan 28, 2012 10:31 am |
Re: C# Performance |
Marco Costalba |
Sat Jan 28, 2012 1:09 pm |
Re: C# Performance |
Lucas Braesch |
Sat Jan 28, 2012 1:52 pm |
Re: C# Performance |
Richard Allbert |
Sat Jan 28, 2012 2:05 pm |
Re: C# Performance |
Marco Costalba |
Sat Jan 28, 2012 2:30 pm |
Re: C# Performance |
Richard Allbert |
Sat Jan 28, 2012 5:22 pm |
Re: C# Performance |
Sven Schüle |
Sat Jan 28, 2012 6:02 pm |
Re: C# Performance |
Richard Allbert |
Sat Jan 28, 2012 6:12 pm |
Re: C# Performance |
Robert Purves |
Sat Jan 28, 2012 10:17 pm |
Re: C# Performance |
Marco Costalba |
Sat Jan 28, 2012 10:25 pm |
Re: C# Performance |
Thomas Petzke |
Sat Jan 28, 2012 4:21 pm |
Re: C# Performance |
Richard Allbert |
Mon Jan 30, 2012 12:52 pm |
Re: C# Performance |
Marco Costalba |
Mon Jan 30, 2012 6:37 pm |
Re: C# Performance |
Richard Allbert |
Wed Feb 01, 2012 6:55 pm |
Re: C# Performance |
Marco Costalba |
Wed Feb 01, 2012 7:18 pm |
Re: C# Performance |
Mark Pearce |
Mon Jan 30, 2012 9:55 pm |
Re: C# Performance |
Richard Allbert |
Wed Feb 01, 2012 6:57 pm |
Re: C# Performance |
Mark Pearce |
Wed Feb 01, 2012 9:59 pm |
Re: C# Performance |
Mark Pearce |
Fri Feb 03, 2012 1:34 am |
Re: C# Performance |
Robert Purves |
Fri Feb 03, 2012 3:26 am |
Re: C# Performance |
Mark Pearce |
Fri Feb 03, 2012 9:28 am |
Re: C# Performance |
Sven Schüle |
Fri Feb 03, 2012 9:45 am |
Re: C# Performance |
Mark Pearce |
Sat Feb 04, 2012 7:57 pm |
Re: C# Performance |
Sven Schüle |
Sat Feb 04, 2012 10:36 pm |
Re: C# Performance |
Mark Pearce |
Sat Feb 04, 2012 11:49 pm |
Re: C# Performance |
Sven Schüle |
Sun Feb 05, 2012 12:51 am |
Re: C# Performance |
Mark Pearce |
Sun Feb 05, 2012 1:05 am |
Re: C# Performance |
Sven Schüle |
Fri Feb 03, 2012 10:04 am |
Re: C# Performance |
Mark Pearce |
Fri Feb 03, 2012 11:40 am |
Re: C# Performance |
Richard Allbert |
Sat Feb 04, 2012 7:10 pm |
Re: C# Performance |
Lucas Braesch |
Sat Feb 04, 2012 8:31 pm |
Re: C# Performance |
Mark Pearce |
Sat Feb 04, 2012 10:23 pm |
Re: C# Performance |
Mark Pearce |
Sun Feb 05, 2012 12:23 am |
Re: C# Performance |
Lucas Braesch |
Sun Feb 05, 2012 2:57 am |
Re: C# Performance |
Mark Pearce |
Sun Feb 05, 2012 11:40 am |
Re: C# Performance |
Richard Allbert |
Mon Feb 06, 2012 6:29 pm |
Re: C# Performance |
Richard Allbert |
Mon Feb 06, 2012 6:29 pm |
Re: C# Performance |
Richard Allbert |
Mon Feb 06, 2012 6:30 pm |
Re: C# Performance |
Richard Allbert |
Mon Feb 06, 2012 6:45 pm |
Re: C# Performance |
Gary |
Mon Feb 06, 2012 7:00 pm |
Re: C# Performance |
Richard Allbert |
Mon Feb 06, 2012 7:12 pm |
Re: C# Performance |
Sven Schüle |
Mon Feb 06, 2012 10:50 pm |
Re: C# Performance |
Richard Allbert |
Tue Feb 07, 2012 9:52 am |
Re: C# Performance |
Richard Allbert |
Tue Feb 07, 2012 9:53 am |
Re: C# Performance |
Richard Allbert |
Tue Feb 07, 2012 9:53 am |
Re: C# Performance |
Richard Allbert |
Tue Feb 07, 2012 9:54 am |
Re: C# Performance |
Mark Pearce |
Tue Feb 07, 2012 1:59 pm |
Re: C# Performance |
Richard Allbert |
Tue Feb 07, 2012 2:54 pm |
Re: C# Performance |
Richard Allbert |
Tue Feb 07, 2012 3:06 pm |
Re: C# Performance |
Mark Pearce |
Tue Feb 07, 2012 5:17 pm |
Re: C# Performance |
Richard Allbert |
Tue Feb 07, 2012 6:10 pm |
Re: C# Performance |
Richard Allbert |
Tue Feb 07, 2012 6:20 pm |
Re: C# Performance |
Mark Pearce |
Tue Feb 07, 2012 8:02 pm |
Re: C# Performance |
Richard Allbert |
Tue Feb 07, 2012 9:19 pm |
Re: C# Performance |
Mark Pearce |
Tue Feb 07, 2012 10:20 pm |
Re: C# Performance |
Richard Allbert |
Wed Feb 08, 2012 7:47 am |
Re: C# Performance |
Richard Allbert |
Wed Feb 08, 2012 7:57 am |
Re: C# Performance |
Sven Schüle |
Wed Feb 08, 2012 10:09 am |
Re: C# Performance |
Mark Pearce |
Wed Feb 08, 2012 12:16 pm |
Re: C# Performance |
Vincent Diepeveen |
Sat Feb 18, 2012 10:03 pm |
Re: C# Performance |
Mark Pearce |
Wed Feb 08, 2012 9:30 am |
Re: C# Performance |
Richard Allbert |
Wed Feb 08, 2012 12:02 pm |
Re: C# Performance |
Richard Allbert |
Wed Feb 08, 2012 12:34 pm |
Re: C# Performance |
Mark Pearce |
Wed Feb 08, 2012 12:56 pm |
Re: C# Performance |
Richard Allbert |
Wed Feb 08, 2012 1:18 pm |
Re: C# Performance |
Richard Allbert |
Wed Feb 08, 2012 2:30 pm |
Re: C# Performance |
Richard Allbert |
Wed Feb 08, 2012 2:34 pm |
Re: C# Performance |
Mark Pearce |
Wed Feb 08, 2012 3:02 pm |
Re: C# Performance |
Richard Allbert |
Wed Feb 08, 2012 3:27 pm |
Re: C# Performance |
Richard Allbert |
Wed Feb 08, 2012 3:29 pm |
Re: C# Performance |
Richard Allbert |
Wed Feb 08, 2012 3:59 pm |
Re: C# Performance |
Richard Allbert |
Wed Feb 08, 2012 4:04 pm |
Re: C# Performance |
Mark Pearce |
Wed Feb 08, 2012 6:07 pm |
Re: C# Performance |
Richard Allbert |
Thu Feb 09, 2012 10:41 am |
Re: C# Performance |
Mark Pearce |
Thu Feb 09, 2012 1:47 pm |
Re: C# Performance |
Richard Allbert |
Thu Feb 09, 2012 2:56 pm |
Re: C# Performance |
Mark Pearce |
Sat Feb 11, 2012 4:41 pm |
Re: C# Performance |
Richard Allbert |
Sun Feb 12, 2012 8:34 am |
Re: C# Performance |
Lucas Braesch |
Sun Feb 12, 2012 10:52 am |
Re: C# Performance |
Richard Allbert |
Sun Feb 12, 2012 12:26 pm |
Re: C# Performance |
Ron Murawski |
Mon Feb 13, 2012 5:26 am |
Re: C# Performance |
Lucas Braesch |
Mon Feb 13, 2012 5:52 am |
Re: C# Performance |
Richard Allbert |
Mon Feb 13, 2012 6:27 am |
Re: C# Performance |
Ron Murawski |
Tue Feb 14, 2012 6:38 am |
Re: C# Performance |
Lucas Braesch |
Tue Feb 14, 2012 8:22 am |
Re: C# Performance |
Mark Pearce |
Tue Feb 14, 2012 11:30 pm |
Re: C# Performance |
Richard Allbert |
Thu Feb 16, 2012 10:49 am |
Re: C# Performance |
Mark Pearce |
Sat Feb 18, 2012 12:34 pm |
Re: C# Performance |
Richard Allbert |
Mon Feb 20, 2012 9:19 pm |
Re: C# Performance |
Mark Pearce |
Tue Feb 21, 2012 8:33 am |
Re: C# Performance |
Richard Allbert |
Tue Feb 21, 2012 6:37 pm |
Re: C# Performance |
Vincent Diepeveen |
Sat Feb 18, 2012 10:19 pm |
Re: C# Performance |
Mark Pearce |
Sun Feb 12, 2012 2:01 pm |
Re: C# Performance |
Richard Allbert |
Sun Feb 12, 2012 4:40 pm |
Re: C# Performance |
Vincent Diepeveen |
Sat Feb 18, 2012 10:06 pm |
Re: C# Performance |
Mark Pearce |
Sun Feb 19, 2012 1:01 pm |
Re: C# Performance |
Vincent Diepeveen |
Sun Feb 19, 2012 5:25 pm |
Re: C# Performance |
Mark Pearce |
Sun Feb 19, 2012 7:04 pm |
Re: C# Performance |
Vincent Diepeveen |
Sun Feb 19, 2012 9:17 pm |
Re: C# Performance |
Mark Pearce |
Sun Feb 19, 2012 11:33 pm |
Re: C# Performance |
Richard Allbert |
Sun Feb 19, 2012 9:22 pm |
Re: C# Performance |
Vincent Diepeveen |
Sun Feb 19, 2012 9:32 pm |
Re: C# Performance |
Vincent Diepeveen |
Sun Feb 19, 2012 9:37 pm |
Re: C# Performance |
Vincent Diepeveen |
Sun Feb 19, 2012 10:06 pm |
Re: C# Performance |
Lucas Braesch |
Wed Feb 08, 2012 10:56 am |
Re: C# Performance |
Mark Pearce |
Wed Feb 08, 2012 11:30 am |
Re: C# Performance |
Richard Allbert |
Wed Feb 08, 2012 12:04 pm |
Re: C# Performance |
Tony Soares |
Tue Feb 07, 2012 3:47 am |
Re: C# Performance |
Richard Allbert |
Tue Feb 07, 2012 9:55 am |
Re: C# Performance |
Mark Pearce |
Sat Feb 04, 2012 8:37 pm |
|
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
|
|