Lost Password?


Go Back   CodeCall Programming Forum > Software Development > General Programming

General Programming Non language specific, Assembly, Linux/Unix, Mac and anything not covered in other topics. Talk about Programming Theory here.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #241 (permalink)  
Old 10-05-2008, 03:09 PM
Xav's Avatar   
Xav Xav is offline
Code Warrior
 
Join Date: Mar 2008
Location: On God's Planet
Posts: 9,589
Last Blog:
Web slideshow in JavaS...
Rep Power: 76
Xav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud of
Send a message via MSN to Xav
Default Re: Contest: C# vs. Java vs. Visual Basic

You can't really be successful without being unnoobish, so really there are unnoobish .NET guys!
__________________


Mr. Xav | Website | Forums | Blog
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #242 (permalink)  
Old 10-05-2008, 03:11 PM
G_Morgan G_Morgan is online now
Guru
 
Join Date: Oct 2007
Age: 24
Posts: 474
Last Blog:
Just over the next hil...
Rep Power: 10
G_Morgan has a spectacular aura aboutG_Morgan has a spectacular aura aboutG_Morgan has a spectacular aura about
Default Re: Contest: C# vs. Java vs. Visual Basic

Quote:
Originally Posted by MeTh0Dz|Reb0rn View Post
Abstraction sucks for a multitude of reasons.

Run time issues, efficiency, performance, etc etc.
Efficiency is dominated by about 3% of the code. That's why we learned to write in a high level language and code the bottlenecks in something more efficient a long time ago.

Often a program written in a higher level language with optimisation driven by a profiler and not the programmers ego will easily outperform one written entirely in a lower level language.

That's why we don't write everything in assembly. The compiler actually does a better job than the programmer because the attention to detail needed to optimise assembly is not possible over the entire program. OTOH the compiler actually does a reasonable job everywhere.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #243 (permalink)  
Old 10-05-2008, 03:13 PM
Xav's Avatar   
Xav Xav is offline
Code Warrior
 
Join Date: Mar 2008
Location: On God's Planet
Posts: 9,589
Last Blog:
Web slideshow in JavaS...
Rep Power: 76
Xav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud of
Send a message via MSN to Xav
Default Re: Contest: C# vs. Java vs. Visual Basic

Is that the old 80-20 rule again?
__________________


Mr. Xav | Website | Forums | Blog
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #244 (permalink)  
Old 10-05-2008, 03:23 PM
G_Morgan G_Morgan is online now
Guru
 
Join Date: Oct 2007
Age: 24
Posts: 474
Last Blog:
Just over the next hil...
Rep Power: 10
G_Morgan has a spectacular aura aboutG_Morgan has a spectacular aura aboutG_Morgan has a spectacular aura about
Default Re: Contest: C# vs. Java vs. Visual Basic

Quote:
Originally Posted by Xav View Post
Is that the old 80-20 rule again?
Something like that but it's more like 95-5 with efficiency. You'll be amazed at how you can make huge performance boosts by profiling and finding the 20 or so lines of code that is causing most of your problems. I talked of my math library in the assembly thread and found out that 25% of my time was using a single function. I then added an SSE implementation for it and this shaved off about 15% of the run time needed (at least on SSE machines, which are most of them).

I certainly don't buy the 'most efficient all the time' line of thought though. I program for a purpose and my time is valuable. In any case programming in C++ doesn't even come close to making your implementation efficient on its own. The fact is that people are very poor at judging where the inefficiencies are. The only proven method is sensible profiling.

As an example there's no way your average C++ programmer will out do Perl for hashing and regular expressions. Those functions (admittedly written in C and ASM) are insanely efficient and even though Perl is interpreted this particular section of it blows everything else away. If your bottle neck is hashing and regular expressions then Perl will outperform C++ unless you go to the trouble to strip the regex and hash implementations from the Perl source code. Python similarly has an abundance of high quality libraries written in efficient lower level languages.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #245 (permalink)  
Old 10-05-2008, 03:25 PM
Xav's Avatar   
Xav Xav is offline
Code Warrior
 
Join Date: Mar 2008
Location: On God's Planet
Posts: 9,589
Last Blog:
Web slideshow in JavaS...
Rep Power: 76
Xav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud of
Send a message via MSN to Xav
Default Re: Contest: C# vs. Java vs. Visual Basic

I never realised it was so high as 95%. I better be careful when writing my code then! Especially in web design, I suppose - such a varied set of download speeds, gotta cater for them all. Like at my school, the speeds can be so slow, you just want to punch the screen and risk detention lol.
__________________


Mr. Xav | Website | Forums | Blog
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #246 (permalink)  
Old 10-05-2008, 03:28 PM
MeTh0Dz|Reb0rn's Avatar   
MeTh0Dz|Reb0rn MeTh0Dz|Reb0rn is online now
My Posts Are Moderated
 
Join Date: Jul 2008
Posts: 17
Rep Power: 0
MeTh0Dz|Reb0rn is an unknown quantity at this point
Default Re: Contest: C# vs. Java vs. Visual Basic

The compiler does a reasonable job, but hand written Assembly code can be more optimized. Example, write a piece of code in C or whatever compile it and the disassemble it. Code the exact same thing in assembly using some optimization techniques and your assembly code will have less code and overhead.

And also using the phrase "high level language" is to vague for this current discussion. As you have basically encompassed everything from C to VB.

The degree of abstraction is of course going to vary which you didn't allude to in your post. In the case of .NET, like we were talking about, there is an inordinate and useless amount of abstraction involved, which is where my issue lies. The overhead this creates is just stupid. In general, a WinAPI wrapper is just a bad idea.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #247 (permalink)  
Old 10-05-2008, 03:33 PM
G_Morgan G_Morgan is online now
Guru
 
Join Date: Oct 2007
Age: 24
Posts: 474
Last Blog:
Just over the next hil...
Rep Power: 10
G_Morgan has a spectacular aura aboutG_Morgan has a spectacular aura aboutG_Morgan has a spectacular aura about
Default Re: Contest: C# vs. Java vs. Visual Basic

Quote:
Originally Posted by Xav View Post
I never realised it was so high as 95%. I better be careful when writing my code then! Especially in web design, I suppose - such a varied set of download speeds, gotta cater for them all. Like at my school, the speeds can be so slow, you just want to punch the screen and risk detention lol.
Naturally the fraction depends upon the problem. Also the code quality makes a huge difference. I find that developing in a style as advocated by the likes of Martin Fowler and the XP movement actually helps efficiency. Though the 'lots of small objects and methods' concept undoubtedly adds a lot of inefficiency up front it also makes it far easier to isolate and optimise the code. Obviously this requires you to go back and actually optimise the code once you are done.

It's not a simple problem but I generally place readability and sanity of design before optimisation. I find the conservative route is also the fastest one in the long run.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #248 (permalink)  
Old 10-05-2008, 03:40 PM
G_Morgan G_Morgan is online now
Guru
 
Join Date: Oct 2007
Age: 24
Posts: 474
Last Blog:
Just over the next hil...
Rep Power: 10
G_Morgan has a spectacular aura aboutG_Morgan has a spectacular aura aboutG_Morgan has a spectacular aura about
Default Re: Contest: C# vs. Java vs. Visual Basic

Quote:
Originally Posted by MeTh0Dz|Reb0rn View Post
The compiler does a reasonable job, but hand written Assembly code can be more optimized. Example, write a piece of code in C or whatever compile it and the disassemble it. Code the exact same thing in assembly using some optimization techniques and your assembly code will have less code and overhead.
On any particular piece of code I will outperform the compiler on selection of operations, register allocation and operation ordering. However I cannot do this for millions of lines of C code. The compiler can crunch through millions without getting a headache. The human brain is remarkable but a limited resource. It's vitally important to apply it selectively and let automation handle the less relevant parts.

Quote:
Originally Posted by MeTh0Dz|Reb0rn View Post
And also using the phrase "high level language" is to vague for this current discussion. As you have basically encompassed everything from C to VB.
I specifically used the terms higher and lower to present a progression. C is a lower level language relative to something like Python.

Quote:
Originally Posted by MeTh0Dz|Reb0rn View Post
The degree of abstraction is of course going to vary which you didn't allude to in your post. In the case of .NET, like we were talking about, there is an inordinate and useless amount of abstraction involved, which is where my issue lies. The overhead this creates is just stupid. In general, a WinAPI wrapper is just a bad idea.
Some perversities have been performed for no apparent benefit without doubt. It depends on how thin the wrappers are though. It could be done by flicking a function pointer and in that case it would be no less efficient than anything else. Something like Swing is obviously less efficient but it's purpose is portability rather than efficiency.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #249 (permalink)  
Old 10-05-2008, 03:44 PM
G_Morgan G_Morgan is online now
Guru
 
Join Date: Oct 2007
Age: 24
Posts: 474
Last Blog:
Just over the next hil...
Rep Power: 10
G_Morgan has a spectacular aura aboutG_Morgan has a spectacular aura aboutG_Morgan has a spectacular aura about
Default Re: Contest: C# vs. Java vs. Visual Basic

It's also worth noting that you shouldn't be using a Win32 wrapper in .Net but should be using things like WPF which are entirely different libraries that only touch the Win32 platform at the lowest levels.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #250 (permalink)  
Old 10-05-2008, 03:45 PM
Xav's Avatar   
Xav Xav is offline
Code Warrior
 
Join Date: Mar 2008
Location: On God's Planet
Posts: 9,589
Last Blog:
Web slideshow in JavaS...
Rep Power: 76
Xav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud of
Send a message via MSN to Xav
Default Re: Contest: C# vs. Java vs. Visual Basic

Quote:
Originally Posted by G_Morgan View Post
Naturally the fraction depends upon the problem.
I immediately think of one particular example - game programming. The need for efficient code is probably the most important of all types of programming.
__________________


Mr. Xav | Website | Forums | Blog
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
what is the bast of basic java programming myothant Java Help 7 02-25-2008 05:36 PM
For the novice in visual basic littlefranciscan Visual Basic Programming 2 02-06-2007 09:30 PM
Visual Studio 2005 and Windows Vista Jordan General Programming 3 01-22-2007 04:21 PM
Graphical programming add-in for Visual Basic 6.0 xXHalfSliceXx Visual Basic Programming 10 01-03-2007 08:14 AM
Parallel Port Programming Using Visual Basic kevintcp85 Visual Basic Programming 12 12-06-2006 01:09 PM


All times are GMT -5. The time now is 01:53 PM.

Contest Stats

WingedPanther ........ 2753.6
Xav ........ 2704
Brandon W ........ 1702.32
John ........ 1207.73
marwex89 ........ 1175.24
morefood2001 ........ 966.05
dcs ........ 655.75
Steve.L ........ 475.59
orjan ........ 418.58
Aereshaa ........ 383.54

Contest Rules

</