|
||||||
| General Programming Non language specific, Assembly, Linux/Unix, Mac and anything not covered in other topics. Talk about Programming Theory here. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
Quote:
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. |
|
|||
|
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. |
| Sponsored Links |
|
|
|
|||||
|
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. |
|
|||
|
Quote:
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. |
|
|||
|
Quote:
Quote:
Quote:
|
|
|||
|
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.
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
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 |
| 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 |