the Hidden Realities of Computer Industry in Japan Japanese

1.4 Execution Speed

You might think, there would be no significant differences in programs written by different programmers. If the programmer B improved the program written by the programmer A to two-fold faster program, you might think the programmer B is really great.

Well, there's no surprise in such figure. Any ordinary effort may make your program two-fold faster. Rather, in these days of computer performance progress, replacing your computer would make your program run two-fold without any modifications. That's a common sense now.

Then, how the programs differ, the one written by a excellent programmer, and the one written by a lousy programmer? Of course, provided that the lousy programmer can finish his job.

As a matter of fact, I am having a trouble with a software package sold by a company. It is so poor that a little complex job would make a computer work more than overnight to compute. That is, a human calculation would be faster. "It's a shame, such a slow program is sold for money," I and my colleges talked, "they might be con men."

So, how long this job would take? This seemed simple to solve, so I gave it a try, and in a couple of hours, I made a program to provide a crude solution. My program provided solutions in a few seconds for nearly all input.

What made the lousy program so slow, I wondered. The package can be purchased, but I would not get the information what made it that slow. It must be a top secret to make that slow program.

I completed my program and made a benchmark test to compare the final result. The package required 50 minutes to compute a rather complex problem. That is, 200-fold slower than my program. No one can settle with the 200-fold difference.

For example, in a fast food restaurant, you might expect a order of hamburger delivered in fifteen seconds. If it took a minute, not fifteen seconds, then you might settle anyway because you thought clerk was slow. But if it took fifty minutes, you would never go to the restaurant again. Rather, such a restaurant might be broken soon.

Such a speed difference would result not in the matter of speed, but in the matter of quality. If it requires a computer fifty minutes to do a job, this is very complex and should not be casually executed. But if it requires fifteen seconds, then it can be executed casually.

You can wait in front of a computer if it requires fifteen seconds to do a job. But if it takes fifty minutes, I can't wait because I am short-tempered person. I wonder if the users of the software package wait for fifty minutes with a peace of mind.

The drastic speed-up gives you not only quality change but time to spend for other activities. You can execute complex jobs, totally different jobs, take a break etc. This could not be given if you were waiting in front of a computer.

More than that, it gives you a mental stability. If you operate a computer and it responds quickly, you are assured. If it doesn't respond, you might get nervous. You would wonder if it is working correctly. You might think your instructions are rejected because you operated in a wrong manner, and you might repeat the operation again and again. If this situation occurs often, the computer is useless.

What made this several-hundred-fold execution speed difference? I don't know because the slower program could not be obtained. But they might invented a method that is unimaginable to me.

For example, to solve the problem of computing the sum of integers one through a hundred, it is very awkward to sum up numbers one through a hundred. This should be computed as 100 x 101 / 2 = 5050. It is a piece of cake, if you know the formula. If you don't know the formula and could not invent the formula, you have to sum up the numbers. You can do it without the formula for one hundred, but you can't for ten thousand because it is impossible to sum up that many numbers manually or with an electronic calculator.

As a result, to know better formula or better method matters. A program is just a procedure to solve the problem, described in a computer-readable way. And you should teach the computer the procedure to solve the problem. So the difference is how programmers taught computer the procedure.

The procedures are called "algorithms" in the computer industry term.

Take another example. Let's say you are to find a company's phone number by the company name from phone books. If you are to find it in your personal phone book, it is trivial. But if you search through the Tokyo metropolitan phone book from the beginning, you are stupid. You would use alphabetically-sorted, industory-wise-sorted, or regionally-sorted ones instead.

It is well common that you use computers to search through very large numbers of data. It should be as fast as possible, of course. You can't look up from the beginning of data, because this is very slow and useless even with the fastest computer. A method to search data as fast as possible is very important subject of computer science, the basic knowledge of which every programmer should learn.

However in real world, there are many, many incompetent programmers who know only the search-from-the-begining method. These guys makes astounding programs that makes me wonder why they can make these so slow.

Plus, these incompetent programmers are very confident in their skills. Alas.

Copyright 1996, 1998 Hirofumi Fujiwara. Translated by S.A.
No reproduction or republication without written permission.

the Hidden Realities of Computer Industry in Japan Japanese