| My first assignment out of college was writing TI-9900 Assembly | code for embedded test equipment control. My last contribution to | that assignment was the hardware and software design for a specific | test box; so I do understand the speed efficiency and the ability | to do device control quickly. However, after becoming an analyst | and systems engineer, I have decided that speed of execution for | many applications is way low in importance relative to speed of | coding. For example, at a higher level than even Fortran or C, how | long do you think it would take to program the following in | assembly code? | | fid = fopen(filename, 'r'); | y = fread(fid); | fclose(fid); | | x = length(y); | | figure(1); | plot(x, y, '-xr'); | title('Data Plot'); | xlabel('Data Point Number'); | ylabel('Data'); | | After doing that, I decided I really don't like writing "for" | loops
Hmm. Two minutes? I'm assuming that the functions invoked have already been programmed - if not, then add an hour.
Just by accident, I happened to have these on-line:
formatting link
first will plot your graph on an Epson FX-80 (the title and label functions are in another file, not on-line), and the second is for a CP/M putchar-like function. fopen(), fread(), and fclose() are similarly quick and easy.
You didn't specify what figure() does, so I didn't include it in the estimate.
Optimizing compilers have pretty much eliminated the assembly language performance advantage...
-- Morris Dovey DeSoto Solar DeSoto, Iowa USA
formatting link