Damon McNeill wrote:I think that hardware mostly determines performance, and software written to take advantage of hardware the hardware capacity can be much more efficient that otherwise. OTOH, it's difficult (impossible) to write general software intended to run on a variety of platforms. The question is, do we develop efficient software that is highly coupled to the hardware architecture, or do we design software with a purposeful ignorance of the hardware?
In my life as a programmer I generally designed software with a very vague understanding of the hardware it would be run on. In the early days we only had small amounts of memory to work with (e.g. 64K) so it was necessary to program in a style which used basically no working memory. Later we had larger amounts of memory so we could write more complex programs. Then we started to use
Java, and we could write general software which was indeed intended to run on a variety of platforms, and did.
I think the vast majority of programmers have little or no idea about the hardware architecture on which their programs run. I read recently that modern Intel chips have six levels of caching to process code. And the chips are designed so that when they come to a branch statement, which apparently is slow, they just continue executing both sides of the if-else until the result of the branch is known, at which time they discard the data from the wrong branch and continue on the right branch. This sort of thing is all very well but it doesn't affect how I write code. I just interpret all of that to mean that the chips are designed to be as fast as possible no matter what code they are given.