From Darin McBride · 1996-04-05 01:18 · #73610 in EMULATE
In reply to Help! Wizard needed! by Jerry Coffin
EB> In a msg on <Apr 02 11:46>, to Bob Stout, Chris Downs writes: CD> It seems that part of the "culture of C" is CD> to be intimately concerned with each clock tick. I think CD> that's truly misguided. Clock ticks matter only when clock CD> ticks matter and clock ticks don't matter very often. EB> I don't know the kinds of projects on which you EB> typically work, but the generalization "clock ticks EB> don't matter very often" isn't accurate in my world. EB> Maybe what you perceive as the "culture of C" is simply EB> a problem domain other than whatever it is you do. Perhaps Chris didn't mean it this way, but I'll give an example that shows what he said. One project at the company I'm doing contract work for is building a 32-bit data manager/server for networking their 16-bit software for real-time data sharing. They are almost ready for field testing - so they ran a profiler. One function (out of a few hundred) ate up 54% of the CPU time for the entire program. IOW, the other 99% of the functions were functions where 'clock ticks don't matter.' (A quick re-write of that function brought it down to under 10%.) Only one function seemed to be 'time-critical'. The rest were negligible. If that 10% is still too much, it may be re-written in hand-tuned assembler, but otherwise it will be left alone. In the drivers I write for the same project, the only optimizations we make in the code have been in the comparison function for qsort. :-) The drivers do real-time data acquisition from PLC's and other controllers... and are completely written in C/C++. Nothing else has had to be changed because, well, it 'is fast enough'. --- Maximus/2 3.01 * Origin: Tanktalus' Tower BBS (PVT) (1:342/708)