Thursday, May 31, 2007

a million dollar question

Why this software run so slow on this machine?

If your answer is, the hardware is too old, you should not continue reading this.

If you are still reading this, congratulation! The above question is not the million dollar question, you have to keep reading till the end for the million dollar question and answer.

The software is running slow because the software has performance issue.

The next question will be, how to improve the software performance?

This is the million dollar question.

There are many ways to solve it, upgrade the hardware is one of it. If one cpu can't perform, buy a two cpu machine. If money is not a problem, you can buy a Sun E10000 (e10k) computer which support up to 64 cpu.

E10k is a few years old product, I am sure they have a much better product now (check here). E10k is not my solution.

I don't like java and java script, because the performance is slow. Even today's hardware can boost up the software performance, but is not my prefer solution. That is the reason they invented Java Just In Time technology, with JIT, Java application can perform as good as a native application.

(Note: Java application was compile as byte code binaries, which need an interpreter environment to run it. Normally application which need an interpreter can't perform as good as the native application compile by C, C++ or the other computer language)

To bring down the cost of the hardware, some CPU was build without the floating point unit, it is common for embedded cpu. The drawback is, software which need extensive floating point calculation can't perform, eg. mpg123 for audio playback.

You are still able to bring down the hardware cost after added in the floating point unit in the hardware, but that's Intel's job, not for us. There are people invented algorithm which do the same job as mpg123, with integer calculation only, which is mpg321.

There is more than one answer for a million dollar question, is either cost you a million or save you a million. You just make your choice.

No comments: