To: Tenchusatsu who wrote (41743 ) 11/18/1998 2:28:00 AM From: Steve Porter Read Replies (1) | Respond to of 1572605
Tench, A long post desrves a longish response ;-)Steve, those days of programming are over, unless you want to plan a house by worrying about every single nail and screw. These days, structured programming takes precedence over tight assembly code. Now I never said the had to write everything in ASM, but they SHOULD know how to for critical loops and the like. The most important thing about programming is not that it's tight, optimized, and fast, but that it's easy to read, maintain, and debug. You can have both.. comments in source code cause no overhead ;-) Why choose one or the other.. Only afterwards do you make the code fast in the places where it counts. You are missing the point of tight code, it's not just speed from ASM, it's speed from proper selection of structures, data types, etc. Today 90% of programmers using floating point declare the variables as double precision, even if they are only going to use single precision math.. that's twice the memory usage.. so waht you say ram is cheap.. yes ram is cheap, but cache space is precious.. The big problem these days isn't code bloat, but feature creep. Just ask Microsoft, the king of feature creep. Again aren't these one and the same.. I mean features that barely work are dead code in my books.By using coding practices that emphasizes time-to-market over stability and maintainability, they've earned the negative reputation that they now have to endure. Well even MS is TRYING to change that in some area.. NT 5.0 kernel (prior to additions) is smaller than it was in 4.0.. IE 5.0 is significantly faster than 4.0 and I'm only using the beta debug build of IE 5.0.As for tight, optimized code, the emphasis these days is to shift all that over to the compiler. Take a look at the floating point output of today's compilers.. it is HORRID. Case in Point: Microsoft Visual C++ 6.0 (the latest and greatest!).. a series of FP multiplies and additions.. them 50clocks, me (rough pass) 18clocks.. that's with ALL optimizations turned on.. the compiler didn't even use the registers in the FPU other ST(0).. no FXCH (which is free if couple with the right instructions).. that's bad code.. net result: MSVC6.0 pixel time of 561 16x16 texels: 1638 ms ASM pixel time: 200and change (I tweaked more obviously, but you get the picture).This allows the programmer to concentrate on the bigger picture and stick to structured programming techniques. I would love to, but I can't live with my app only refreshing the screen once every 2 seconds.. I need 30+fps.. so I guess I have to concentrate on all the small pieces that make up the big piece. BTW: have you done any commerical development these days.. there are usually so many guys working on a project that they COULD write it in ASM. Steve